algolia / algolia/algoliasearch-client-php
[RFC] Make troubleshooting stuck tasks easier
- Dominant language
- PHP
- Stars
- 697
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
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`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.