$highest_priority = 0;
if (poller_passing_slow($highest_priority)) {
- dba::p('LOCK TABLES `workerqueue` WRITE');
+ dba::e('LOCK TABLES `workerqueue` WRITE');
// Are there waiting processes with a higher priority than the currently highest?
$r = q("SELECT * FROM `workerqueue`
return $r;
}
} else {
- dba::p('LOCK TABLES `workerqueue` WRITE');
+ dba::e('LOCK TABLES `workerqueue` WRITE');
}
// If there is no result (or we shouldn't pass lower processes) we check without priority limit
// We only unlock the tables here, when we got no data
if (!dbm::is_result($r)) {
- dba::p('UNLOCK TABLES');
+ dba::e('UNLOCK TABLES');
}
return $r;
$success = dba::update('workerqueue', array('executed' => datetime_convert(), 'pid' => $mypid),
array('id' => $queue["id"], 'pid' => 0));
- dba::p('UNLOCK TABLES');
+ dba::e('UNLOCK TABLES');
if (!$success) {
logger("Couldn't update queue entry ".$queue["id"]." - skip this execution", LOGGER_DEBUG);