mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
We got rid of two workerqueue queries, yeah!
This commit is contained in:
parent
06815f1a38
commit
7d0a7f6be9
4 changed files with 12 additions and 28 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue