From b0a302bf77a3d230d6db28b5ac3102a8693b0160 Mon Sep 17 00:00:00 2001 From: f0o Date: Tue, 1 Sep 2015 11:10:56 +0100 Subject: [PATCH] Release MySQL locks when they are not used anymore --- discovery.php | 1 + poller.php | 1 + 2 files changed, 2 insertions(+) diff --git a/discovery.php b/discovery.php index a8e48c649..e56f104bf 100755 --- a/discovery.php +++ b/discovery.php @@ -108,6 +108,7 @@ if ($config['distributed_poller'] === true) { foreach (dbFetch("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC") as $device) { if (dbGetLock('discovering.' . $device['device_id'])) { discover_device($device, $options); + dbReleaseLock('discovering.' . $device['device_id']); } } diff --git a/poller.php b/poller.php index 8c2b32881..57132457d 100755 --- a/poller.php +++ b/poller.php @@ -114,6 +114,7 @@ foreach (dbFetch($query) as $device) { poll_device($device, $options); RunRules($device['device_id']); echo "\r\n"; + dbReleaseLock('polling.' . $device['device_id']); } $polled_devices++; }