-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Unlock failed cron jobs and set a high "last_checked" value to avoid continous re-check #10010
Conversation
MorrisJobke
commented
Jun 26, 2018
•
edited
Loading
edited
- fixes issue where cronjobs of a not-loaded app are marked as "still running" because there is a "reserved_at" value stored
- fixes Cronjob blocking update (forever) #9992
- add a repair step that sets the value of all jobs to 0 during upgrade to not run into this issue in the future for fast upgrades
I also added another check in the updater to only wait for cron if the upgrade is from a version after this commit to have the fixed cron jobs already included. It could still cause trouble if there is this cronjob entry, then an upgrade to 14.0.0.7 happens and then directly the next upgrade happens without cron.php to execute to clean up the reserved jobs. Maybe I will add another repair step to reset the "reserved_at" entries. |
@@ -214,6 +215,14 @@ public function getNext() { | |||
$job = $this->buildJob($row); | |||
|
|||
if ($job === null) { | |||
// set the last_checked to 12h in the future to not check failing jobs all over again |
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.
This is basically a non-exiting job or one of a disabled app, not a "failing job"
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.
If execute()
fails, it is still blocked for ever
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.
Fixes the update issue #9992 for me
I ran into this, and with this PR, I had to manually set maintenance to false and reload the upgrade process. |
63dd136
to
009621d
Compare
Codecov Report
@@ Coverage Diff @@
## master #10010 +/- ##
============================================
+ Coverage 51.42% 51.97% +0.55%
+ Complexity 26413 26019 -394
============================================
Files 1690 1661 -29
Lines 97716 96181 -1535
Branches 1292 1290 -2
============================================
- Hits 50248 49990 -258
+ Misses 47468 46191 -1277
|
009621d
to
b7ce899
Compare
Ready for review. I added a repair step and it worked over here. |
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.
Does the trick for me.
I vote to merge as it at least improves the situation.
…continous re-check * fixes issue where cronjobs of a not-loaded app are marked as "still running" because there is a "reserved_at" value stored * fixed #9992 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* see #9992 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
b7ce899
to
79801ad
Compare
I just updated the version again as master had it already and added two times:
because there were two false positives. |