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
Exception in periodic task stops this task queue #1308
Comments
Thanks! I don't know if this is a bug per-se, but was a design choice to not keep re-running a crashing job. That said, perhaps this belongs as an option to re-run crashing jobs or not? Are you able to make a Pull request with your changes we can discuss? |
Amending my note above, it might be cool to have the new |
I feel like this is more useful for very specific jobs. For instance, if I have a job that I know might throw an error initially but will return successfully at some point over a bounded period of time then it might be useful for that job to keep crashing until it returns successfully(although now that I write that down it seems like a very unlikely scenario). |
That's a good hint that perhaps the option should be on the task itself! |
Going off of what I said about a bounded interval, you might also add a variable for the number of allowed retries or amount of time it's allowed to retry until it finally returns the error. |
It seems to me that this is an excessive complication. I think that |
Fix: Exception in periodic task stops this task queue New task option: reEnqueuePeriodicTaskIfException
Name of Issue
Exception in periodic task stops this task queue
19.1.4
8.11.3
(Windows 10)
Steps to reproduce your error
To create test-task.js with content:
Steps to fix error
Old snippet in actionhero/initializers/tasks.js:
to replace by new:
The text was updated successfully, but these errors were encountered: