Merge remote-tracking branch 'upstream/3.5.2rc' into 1706-lock

This commit is contained in:
Michael 2017-06-04 19:06:40 +00:00
commit 2d229ad856
5 changed files with 16 additions and 7 deletions

View file

@ -555,7 +555,7 @@ function poller_worker_process() {
$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`
@ -577,7 +577,7 @@ function poller_worker_process() {
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
@ -587,7 +587,7 @@ function poller_worker_process() {
// 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;
@ -607,7 +607,7 @@ function poller_claim_process($queue) {
$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);