Rename removeSubscribers() method and encapsulate task completion logic [MAILPOET-987]

This commit is contained in:
stoletniy
2017-07-20 11:22:47 +03:00
parent c924778d50
commit b42d8e68d9
4 changed files with 6 additions and 6 deletions

View File

@ -12,6 +12,7 @@ class ScheduledTask extends Model {
const PRIORITY_LOW = 10;
function complete() {
$this->processed_at = current_time('mysql');
$this->set('status', self::STATUS_COMPLETED);
$this->save();
return ($this->getErrors() === false && $this->id() > 0);