Sending queue router update

- cleaned up useless code
- bugfixes
- improved code coverage
This commit is contained in:
Jonathan Labreuille
2016-02-11 09:37:53 +01:00
committed by Vlad
parent cfb4265971
commit 409697ee64
19 changed files with 325 additions and 532 deletions

View File

@ -15,7 +15,8 @@ class SendingQueue extends Model {
return false;
} else {
$this->set('status', 'paused');
return $this->save();
$this->save();
return ($this->getErrors() === false && $this->id() > 0);
}
}
@ -24,12 +25,14 @@ class SendingQueue extends Model {
return $this->complete();
} else {
$this->set_expr('status', 'NULL');
return $this->save();
$this->save();
return ($this->getErrors() === false && $this->id() > 0);
}
}
function complete() {
$this->set('status', 'completed');
return $this->save();
$this->save();
return ($this->getErrors() === false && $this->id() > 0);
}
}