Rotate scheduled tasks

Scheduled tasks should rotate so that they don't block
sending when they cannot be send.

[MAILPOET-1391]
This commit is contained in:
Pavel Dohnal
2018-06-04 16:00:32 +01:00
parent 24b63d324b
commit b8ce6ff88c
5 changed files with 52 additions and 1 deletions

View File

@ -74,4 +74,12 @@ class ScheduledTask extends Model {
parent::save();
return $this;
}
static function touchAllByIds(array $ids) {
ScheduledTask::rawExecute(
'UPDATE `' . ScheduledTask::$_table . '`' .
'SET `updated_at` = NOW() ' .
'WHERE `id` IN (' . join(',', $ids) . ')'
);
}
}