Changed timeout, logging added
This commit is contained in:
parent
cd129665ef
commit
e232c683b6
|
@ -675,8 +675,8 @@ class dba {
|
|||
|
||||
$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);
|
||||
|
|
|
@ -649,11 +649,15 @@ function find_worker_processes() {
|
|||
*/
|
||||
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()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user