We got rid of two workerqueue queries, yeah!

This commit is contained in:
Michael 2017-06-11 19:51:18 +00:00
parent 06815f1a38
commit 7d0a7f6be9
4 changed files with 12 additions and 28 deletions

View file

@ -84,6 +84,9 @@ function poller_run($argv, $argc){
// We fetch the next queue entry that is about to be executed
while ($r = poller_worker_process()) {
// Assure that the priority is an integer value
$r[0]['priority'] = (int)$r[0]['priority'];
// If we got that queue entry we claim it for us
if (!poller_claim_process($r[0])) {
dba::unlock();
@ -255,10 +258,12 @@ function poller_exec_function($queue, $funcname, $argv) {
// But preserve the old one for the worker
$old_process_id = $a->process_id;
$a->process_id = uniqid("wrk", true);
$a->queue = $queue;
$funcname($argv, $argc);
$a->process_id = $old_process_id;
unset($a->queue);
$duration = number_format(microtime(true) - $stamp, 3);