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

Feature | Use native Laravel retry logic when possible #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lukasmu
Copy link
Contributor

@lukasmu lukasmu commented Apr 22, 2024

Laravel typically stores failed jobs in a dedicated table when using the database driver. You can retry these jobs using an Artisan command. This command ensures that the jobs are re-added to the queue and removed from the table for failed jobs.

In Vulture, this job retry logic is currently not utilized. When you call the retry method of a WorkflowJob instance, a new job is created and sent to the Laravel queue. If a job fails multiple times and is retried, the table for failed jobs can quickly accumulate multiple instances of the same job.

This PR proposes utilizing Laravel's default job retry logic whenever possible. While the proposed implementation works, it is not particularly nice. In particular, the database query may not scale efficiently. This PR serves as a proof of concept. If accepted, I'm willing to enhance it (such as by adding Laravel job UUIDs to WorkflowJob instances upon dispatching).

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.

1 participant