mirror of
https://github.com/friendica/friendica
synced 2025-04-26 18:30:11 +00:00
Merge remote-tracking branch 'upstream/3.5.2rc' into 1706-lock
This commit is contained in:
commit
2d229ad856
5 changed files with 16 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue