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

Jobs getting stuck in processing #137

Open
theoks opened this issue Oct 18, 2024 · 2 comments
Open

Jobs getting stuck in processing #137

theoks opened this issue Oct 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@theoks
Copy link

theoks commented Oct 18, 2024

Describe the issue

If an exception is thrown in the dequeue function, the jobs are stuck in processing, and they never complete.

Vapor version

4.106.0

Operating system and version

macOS 14.7

Swift version

SPM - Swift 6.0.0

Steps to reproduce

  1. Create a job and throw an exception in the dequeue handler.

Outcome

Jobs are getting stuck in processing in the DB.

Additional notes

No response

@theoks theoks added the bug Something isn't working label Oct 18, 2024
@gwynne gwynne self-assigned this Oct 18, 2024
@gwynne
Copy link
Member

gwynne commented Oct 18, 2024

Thanks for refiling this! I'll see what I can come up with for a fix as soon as I can, probably this coming weekend.

@gwynne
Copy link
Member

gwynne commented Oct 18, 2024

So at a quick look through the code, errors thrown from dequeue() are caught and handled by the retry-or-fail machinery. From what I can tell, the only way for a job to get stuck under these conditions is if it subsequently also throws an error from its error() method. Is it possible that's happening in your case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants