if no proper backend is configured, the worker process
just quits instead of running in an infinite loop
https://forge.tine20.org/view.php?id=11870
Change-Id: I28344d2f5124ad8cd282908d9d9d6186b5c29331
Reviewed-on: http://gerrit.tine20.com/customers/3163
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
{
return call_user_func_array(array($this->_queue, $name), $arguments);
}
+
+ /**
+ * returns the class name of the used queue implementation
+ *
+ * @return string
+ */
+ public function getBackendType()
+ {
+ return get_class($this->_queue);
+ }
}
*/
public function run()
{
+ if ('Tinebase_ActionQueue_Backend_Direct' === Tinebase_ActionQueue::getInstance()->getBackendType()) {
+ $this->_getLogger()->crit(__METHOD__ . '::' . __LINE__ . ' Tinebase_ActionQueue_Backend_Direct used. There is nothing to do for the worker! Configure Redis backend for example if you want to make use of the worker.');
+ exit(1);
+ }
+
while (true) {
// manage the number of children