Minor queue fixes, probably not very important. Preparing for cron
This commit is contained in:
parent
0a93fa68f3
commit
1a0e17fea6
@ -44,7 +44,7 @@ class DBQueueManager extends QueueManager
|
|||||||
$qi->created = common_sql_now();
|
$qi->created = common_sql_now();
|
||||||
$result = $qi->insert();
|
$result = $qi->insert();
|
||||||
|
|
||||||
if (!$result) {
|
if ($result === false) {
|
||||||
common_log_db_error($qi, 'INSERT', __FILE__);
|
common_log_db_error($qi, 'INSERT', __FILE__);
|
||||||
throw new ServerException('DB error inserting queue item');
|
throw new ServerException('DB error inserting queue item');
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,9 @@ abstract class QueueManager extends IoManager
|
|||||||
self::$qm = new UnQueueManager();
|
self::$qm = new UnQueueManager();
|
||||||
} else {
|
} else {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
case 'cron':
|
||||||
|
self::$qm = new GNUsocialCron();
|
||||||
|
break;
|
||||||
case 'db':
|
case 'db':
|
||||||
self::$qm = new DBQueueManager();
|
self::$qm = new DBQueueManager();
|
||||||
break;
|
break;
|
||||||
|
@ -37,7 +37,7 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
|
|||||||
|
|
||||||
$daemons = array();
|
$daemons = array();
|
||||||
|
|
||||||
$daemons[] = INSTALLDIR.'/scripts/queuedaemon.php';
|
#$daemons[] = INSTALLDIR.'/scripts/queuedaemon.php';
|
||||||
|
|
||||||
if (Event::handle('GetValidDaemons', array(&$daemons))) {
|
if (Event::handle('GetValidDaemons', array(&$daemons))) {
|
||||||
foreach ($daemons as $daemon) {
|
foreach ($daemons as $daemon) {
|
||||||
|
Loading…
Reference in New Issue
Block a user