[PLUGINS] Added UnQueue, a new default plugin which does all actions immediately

This commit is contained in:
Miguel Dantas
2019-09-01 00:40:33 +01:00
committed by Hugo Sales
parent 544f13c52a
commit 6747b18b75
5 changed files with 66 additions and 12 deletions

View File

@@ -59,18 +59,9 @@ abstract class QueueManager extends IoManager
if (empty(self::$qm)) {
if (Event::handle('StartNewQueueManager', array(&self::$qm))) {
$enabled = common_config('queue', 'enabled');
$type = common_config('queue', 'subsystem');
if (!$enabled) {
// does everything immediately
self::$qm = new UnQueueManager();
} else {
switch ($type) {
default:
throw new ServerException("No queue manager class for type '$type'");
}
}
common_log(LOG_ERR, 'Some form of queue manager must be active' .
'(UnQueue does everything immediately and is the default)');
throw new ServerException('Some form of queue manager must be active');
}
}