[RFC] Make troubleshooting stuck tasks easier
还没有人认领这个 Issue。
评估
调研方向
从 src/SearchIndex.php 大约第 604–620 行开始,跟踪在对响应调用 wait() 时使用的重试逻辑。检查周围的客户端配置和初始化流程;当可以通过可注入的自定义实现提供重试行为,而不需要覆盖 SearchIndex 和 SearchClient 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hi! I'm working with @julienpa to get the applications of my company on a new Algolia architecture, and I'm facing issues where some of the cronjobs I have to run appear to be stuck sometimes.
I'd like to be able to easily implement custom logic where I start logging the taskID with an increasingly high log level when exceeded an arbitrary duration, and I would like that logic to kick in whenever I call wait() on a response.
This seems to result in this method being called: https://github.com/algolia/algoliasearch-client-php/blob/ffef644ac41411f64e4522157ed53fb825b0908a/src/SearchIndex.php#L604-L620
It would be great if the current implementation of the retry logic could be extracted in a separate class, and if there was an interface I could implement with my custom logic and if I was able to inject my custom implementation in the configuration so that it replaces the default implementation.
Right now, the workaround would be to extend the SearchIndex, override that method, extend SearchClient and override initIndex so that it returns the overridden SearchIndex.
- 主要语言
- PHP
- 星标
- 696
- 派生
- 111
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
algolia/algoliasearch-client-php 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
[bug]: Please tag a new major version when introducing BC breaks可能重新可做 @Fluf22 于 216 天前认领,目前没有进行中的 PR。 未关闭
algolia/algoliasearch-client-php#760 · 5 条评论 · 1 个 reaction · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 45/100
algolia/algoliasearch-client-php#753 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
-
[bug]: Use enums未关闭
难度 2/5 1-3 小时 新手友好度 45/100
algolia/algoliasearch-client-php#748 · 1 条评论 ·
查看 algolia/algoliasearch-client-php 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 63/100
phpstan/phpstan-phpunit#361 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
HE-Arc/le-panier-du-coin#49 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 2 天内回复
-
15.0
难度 2/5 1-3 小时 新手友好度 65/100
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
LinkNacional/woo-rede#367 ·