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

best way to re-activate a job #356

Closed
jnicho02 opened this issue Apr 8, 2022 · 2 comments · Fixed by #357
Closed

best way to re-activate a job #356

jnicho02 opened this issue Apr 8, 2022 · 2 comments · Fixed by #357

Comments

@jnicho02
Copy link

jnicho02 commented Apr 8, 2022

What is the best procedure to re-activate a job that errored due to a system fault that has now been fixed? QueJob does a great job of retrying with backoff and eventually giving up (is that true?).

reset the error_count to 0?

nil out the expired_at date?

Oh, and should I be able to access Que::ActiveRecord::Model in Rails console? I can access Que::ActiveRecord but no Que::ActiveRecord::Model (i've added my own Rails model record to be able access it for now)

I think this would be useful practical help to anyone running live, and should go in the documentation

@jnicho02
Copy link
Author

jnicho02 commented Apr 8, 2022

Just successfully did a

.update(error_count: 0, expired_at: nil)

@ZimbiX
Copy link
Member

ZimbiX commented Apr 8, 2022

That update looks good to me. You're right that we should document it. Feel free to PR the docs ;)

Oh, and should I be able to access Que::ActiveRecord::Model in Rails console? I can access Que::ActiveRecord but no Que::ActiveRecord::Model (i've added my own Rails model record to be able access it for now)

I don't have experience with using it in Rails, but I believe you'd need to require 'que/active_record/model', and perhaps define the subclass from that example too (as I think you're saying you've done).

eventually giving up (is that true?).

Yeah, that's what expired_at indicates. See error handling and maximum_retry_count.

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 a pull request may close this issue.

2 participants