- logger("Couldn't select a workerqueue entry, quitting process " . getmypid() . ".", LOGGER_DEBUG);
+ Logger::log("Couldn't select a workerqueue entry, quitting process " . getmypid() . ".", Logger::DEBUG);
+ }
+
+ /**
+ * @brief Returns the number of deferred entries in the worker queue
+ *
+ * @return integer Number of deferred entries in the worker queue
+ */
+ private static function deferredEntries()
+ {
+ return DBA::count('workerqueue', ["`executed` <= ? AND NOT `done` AND `next_try` > ?",
+ DBA::NULL_DATETIME, DateTimeFormat::utcNow()]);