- Updates queue worker to use mailer router for sending

- Updates mailer router to detect method type
- Rebases master
This commit is contained in:
MrCasual
2015-12-03 19:12:18 -05:00
parent 4a2bbe3f88
commit acebf669a7
3 changed files with 54 additions and 85 deletions

View File

@ -62,9 +62,11 @@ class Daemon {
) {
$this->abortWithError('invalid token');
}
$worker = new Worker($this->timer);
$worker->process();
try {
$worker = new Worker($this->timer);
$worker->process();
} catch(Exception $e) {
}
$elapsedTime = microtime(true) - $this->timer;
if($elapsedTime < 30) {
sleep(30 - $elapsedTime);
@ -76,7 +78,7 @@ class Daemon {
$daemonData['token'] = $this->refreshedToken;
$daemon->value = json_encode($daemonData);
$daemon->save();
$this->callSelf();
if($daemonData['status'] === 'strated') $this->callSelf();
}
function getDaemon() {