-
Notifications
You must be signed in to change notification settings - Fork 0
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
Long running tasks #42
Conversation
* Prevent setting task to failed on bulk argument fail * add phpdoc
@eriktad please log follow messing, when setting bulk arguments to failed: |
… tasks repeat duration
@eriktad
|
I don't like the way we have implemented migrations, but let's move to live and get back to this later, it's working anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good for now, we can review migrations later.
Related to: #32
About running tasks.
The fatal error cases where PHP stops working and can't trigger Exceptions, for instance, allowed memory size exhausted, Maximum execution time of n seconds exceeded, - we can't do anything more, only can fix this issue on the next BTM cycle. For that, we created a new column in the tasks table - last_modified. After every task change, we change the task modification time. And on every BTM start, we get all running tasks if those exist, setting up to in_progress status, if it is a bulk task we set their bulk running arguments to failed status. We do this process if the double Cron interval time is less than the difference between the current time and the task modification time.