diff options
author | DM42.Net (Matt Dent) <dentm42@dm42.net> | 2018-12-30 15:05:45 -0500 |
---|---|---|
committer | DM42.Net (Matt Dent) <dentm42@dm42.net> | 2018-12-30 15:05:45 -0500 |
commit | a50433dd958ec52eec88867517b3ae6467758618 (patch) | |
tree | 49f1df7106d9295887f0d74a842a7f819867ea16 | |
parent | f81a3ba45d50c0a0e4da68c17aba73425058e23d (diff) | |
download | volse-hubzilla-a50433dd958ec52eec88867517b3ae6467758618.tar.gz volse-hubzilla-a50433dd958ec52eec88867517b3ae6467758618.tar.bz2 volse-hubzilla-a50433dd958ec52eec88867517b3ae6467758618.zip |
Use subselect
-rw-r--r-- | Zotlabs/Daemon/Master.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Master.php b/Zotlabs/Daemon/Master.php index 0656ca05b..70d80d75b 100644 --- a/Zotlabs/Daemon/Master.php +++ b/Zotlabs/Daemon/Master.php @@ -89,7 +89,7 @@ class Master { $workersleep = ($workersleep) ? $workersleep : 5; cli_startup(); - $work = q("update config set k='%s' where cat='queuework' and k like '%s' limit 1", + $work = q("update config set k='%s' where id in (select id from config where cat='queuework' and k like '%s' limit 1)", 'workitem_'.self::$queueworker, dbesc('workitem:%')); $jobs = 0; @@ -122,9 +122,9 @@ class Master { break; } sleep ($workersleep); - $work = q("update config set k='%s' where cat='queuework' and k like '%s' limit 1", - 'workitem_'.self::$queueworker, - dbesc('workitem:%')); + $work = q("update config set k='%s' where id in (select id from config where cat='queuework' and k like '%s' limit 1)", + 'workitem_'.self::$queueworker, + dbesc('workitem:%')); } logger('Master: Worker Thread: queue items processed:' . $jobs); |