From 6289e307aa0ccd966d84185864d6466c4f8836f7 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 13 Feb 2018 02:26:35 +0000 Subject: [PATCH] Bugfix: The provided worker priority had been ignored --- src/Core/Worker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index e8a1f2e9f6..140d0e014d 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -1018,6 +1018,8 @@ class Worker $dont_fork = Config::get("system", "worker_dont_fork"); $created = DateTimeFormat::utcNow(); + $run_parameter = array_shift($args); + if (is_int($run_parameter)) { $priority = $run_parameter; } elseif (is_array($run_parameter)) { @@ -1032,8 +1034,6 @@ class Worker } } - array_shift($args); - $parameters = json_encode($args); $found = dba::exists('workerqueue', ['parameter' => $parameters, 'done' => false]); -- 2.39.5