$args = func_get_args();
- // In a case of a deadlock we are repeating the query 10 times
- $timeout = 10;
+ // In a case of a deadlock we are repeating the query 20 times
+ $timeout = 20;
do {
$stmt = call_user_func_array('self::p', $args);
*/
function poller_worker_process() {
+ $stamp = (float)microtime(true);
+
$timeout = 10;
do {
$found = find_worker_processes();
} while (!$found && (poller_total_entries() > 0) && (--$timeout > 0));
+ logger('Duration: '.number_format(microtime(true) - $stamp, 3), LOGGER_DEBUG);
+
if ($found) {
$r = q("SELECT * FROM `workerqueue` WHERE `pid` = %d", intval(getmypid()));
}