Minor queue fixes, probably not very important. Preparing for cron

This commit is contained in:
Mikael Nordfeldth 2013-11-13 18:15:21 +01:00
parent 0a93fa68f3
commit 1a0e17fea6
3 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class DBQueueManager extends QueueManager
$qi->created = common_sql_now();
$result = $qi->insert();
if (!$result) {
if ($result === false) {
common_log_db_error($qi, 'INSERT', __FILE__);
throw new ServerException('DB error inserting queue item');
}

View File

@ -67,6 +67,9 @@ abstract class QueueManager extends IoManager
self::$qm = new UnQueueManager();
} else {
switch ($type) {
case 'cron':
self::$qm = new GNUsocialCron();
break;
case 'db':
self::$qm = new DBQueueManager();
break;

View File

@ -37,7 +37,7 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
$daemons = array();
$daemons[] = INSTALLDIR.'/scripts/queuedaemon.php';
#$daemons[] = INSTALLDIR.'/scripts/queuedaemon.php';
if (Event::handle('GetValidDaemons', array(&$daemons))) {
foreach ($daemons as $daemon) {