Revert all PHP-Based MySQL Locks introduced in #1584

This commit is contained in:
f0o
2015-09-02 14:46:42 +01:00
parent bc3916df2c
commit da9e071d7d
5 changed files with 4 additions and 93 deletions

View File

@@ -100,13 +100,6 @@ if (isset($options['r'])) {
$config['norrd'] = true;
}
echo 'Checking for MySQL Locks:';
while (!dbCheckLock('schema_update')) {
echo '.';
sleep(1);
}
echo PHP_EOL;
rrdtool_pipe_open($rrd_process, $rrd_pipes);
echo "Starting polling run:\n\n";
@@ -117,13 +110,9 @@ if (!isset($query)) {
foreach (dbFetch($query) as $device) {
$device = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = '".$device['device_id']."'");
if (dbGetLock('polling.' . $device['device_id'])) {
register_shutdown_function('dbReleaseLock','polling.'.$device['device_id']);
poll_device($device, $options);
RunRules($device['device_id']);
echo "\r\n";
dbReleaseLock('polling.' . $device['device_id']);
}
poll_device($device, $options);
RunRules($device['device_id']);
echo "\r\n";
$polled_devices++;
}