Rename removeSubscribers() method and encapsulate task completion logic [MAILPOET-987]
This commit is contained in:
@ -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);
|
||||
|
@ -92,7 +92,7 @@ class SendingQueue extends Model {
|
||||
return $model;
|
||||
}
|
||||
|
||||
function removeNonexistentSubscribers($subscribers_to_remove) {
|
||||
function removeSubscribers($subscribers_to_remove) {
|
||||
$subscribers = $this->getSubscribers();
|
||||
$subscribers['to_process'] = array_values(
|
||||
array_diff(
|
||||
|
Reference in New Issue
Block a user