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

Long running tasks #42

Merged
merged 13 commits into from
Apr 30, 2020
Merged

Long running tasks #42

merged 13 commits into from
Apr 30, 2020

Conversation

grogou
Copy link
Member

@grogou grogou commented Mar 10, 2020

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.

aahovhannisyan and others added 2 commits March 3, 2020 11:31
@arsendovlatyan
Copy link
Member

@eriktad please log follow messing, when setting bulk arguments to failed:
Terminated execution of long-running bulk arguments: 1, 2, 3. Moved task to "In Progress"

@arsendovlatyan arsendovlatyan requested review from arsendovlatyan and removed request for zzhovo and arsendovlatyan April 20, 2020 20:46
@arsendovlatyan
Copy link
Member

@eriktad

  • according to my comment Long running tasks #32 (comment) , let's remove x2, just move task to in-progress if task is running longer than our cron job interval
  • please make a separate commit to fix coding standards

@arsendovlatyan
Copy link
Member

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.

@arsendovlatyan arsendovlatyan self-requested a review April 30, 2020 09:52
Copy link
Member

@arsendovlatyan arsendovlatyan left a 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.

@arsendovlatyan arsendovlatyan merged commit df737e0 into master Apr 30, 2020
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.

4 participants