mirror of
https://github.com/friendica/friendica
synced 2025-04-25 10:30:12 +00:00
Unsuccessful ActivitiyPub transmission are now deferred
This commit is contained in:
parent
65f29800ff
commit
e3e714a45f
4 changed files with 34 additions and 14 deletions
|
@ -243,7 +243,9 @@ class Worker
|
|||
self::execFunction($queue, $include, $argv, true);
|
||||
|
||||
$stamp = (float)microtime(true);
|
||||
if (DBA::update('workerqueue', ['done' => true], ['id' => $queue['id']])) {
|
||||
|
||||
$condition = ["`id` = ? AND `next_try` < ?", $queue['id'], DateTimeFormat::utcNow()];
|
||||
if (DBA::update('workerqueue', ['done' => true], $condition)) {
|
||||
Config::set('system', 'last_worker_execution', DateTimeFormat::utcNow());
|
||||
}
|
||||
self::$db_duration = (microtime(true) - $stamp);
|
||||
|
@ -1137,8 +1139,8 @@ class Worker
|
|||
$id = $queue['id'];
|
||||
|
||||
if ($retrial > 14) {
|
||||
logger('Id ' . $id . ' had been tried 14 times, it will be deleted now.', LOGGER_DEBUG);
|
||||
DBA::delete('workerqueue', ['id' => $id]);
|
||||
logger('Id ' . $id . ' had been tried 14 times. We stop now.', LOGGER_DEBUG);
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate the delay until the next trial
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue