Skip to content
Snippets Groups Projects
Commit b6e4c5f1 authored by Eugene Tulika's avatar Eugene Tulika
Browse files

Merge pull request #1052 from LukeOl/missed_cronjobs_history_cleanup_fix

Fix for missed cronjobs history cleanup
parents 96093120 b04cf0e7
Branches
No related merge requests found
...@@ -353,7 +353,8 @@ class Observer ...@@ -353,7 +353,8 @@ class Observer
$now = time(); $now = time();
/** @var Schedule $record */ /** @var Schedule $record */
foreach ($history as $record) { foreach ($history as $record) {
if (strtotime($record->getExecutedAt()) < $now - $historyLifetimes[$record->getStatus()]) { $checkTime = strtotime($record->getExecutedAt() ? $record->getExecutedAt() : $record->getScheduledAt());
if ($checkTime < $now - $historyLifetimes[$record->getStatus()]) {
$record->delete(); $record->delete();
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment