Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Retry into Queue Lib #17

Merged
merged 15 commits into from
Jan 17, 2024
Merged

Implement Retry into Queue Lib #17

merged 15 commits into from
Jan 17, 2024

Conversation

PineappleIOnic
Copy link
Member

This PR implements Retry functionality into the Queue library, it will take all failed jobs in {namespace}.failed.{queue} and re-queue them while removing them from that list.

@PineappleIOnic PineappleIOnic changed the title Finish Initial Retry Implementation Implement Retry into Queue Lib Dec 29, 2023
tests/Queue/e2e/AdapterTest.php Outdated Show resolved Hide resolved
src/Queue/Client.php Show resolved Hide resolved
src/Queue/Client.php Outdated Show resolved Hide resolved
tests/Queue/e2e/Adapter/SwooleTest.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
Git ignored when I renamed it from e2e to E2E so I had to manually mv it using the cli
@TorstenDittmann
Copy link
Contributor

TorstenDittmann commented Jan 2, 2024

How is the retry strategy applied in production?

As far as I can see here right now, is that we manually need to retry and it just works of all failed jobs. I am not sure if this is the most sane approach. Usually with all common libraries, the retry configuration is tied to a job. Meaning you enqueue a job while defining how its going to be retried.

I am not sure if blindly just working of failed jobs is good. We dont know how many times a job has been retried, etc.

ref:

@PineappleIOnic
Copy link
Member Author

Right, I'll try and so some research and think of something better

Copy link
Member

@eldadfux eldadfux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the sum method I saw in the Appwrite PR? I can't seem to find it.

src/Queue/Client.php Show resolved Hide resolved
src/Queue/Client.php Show resolved Hide resolved
src/Queue/Client.php Outdated Show resolved Hide resolved
@christyjacob4 christyjacob4 merged commit 9175652 into main Jan 17, 2024
3 checks passed
@christyjacob4 christyjacob4 deleted the feat-retry branch January 17, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants