mirror of
https://github.com/friendica/friendica
synced 2025-04-25 00:30:32 +00:00
New function for the number of retrials / Daily reload of hooks
This commit is contained in:
parent
1b7075aebb
commit
7faba0de5e
2 changed files with 14 additions and 0 deletions
|
@ -1365,6 +1365,17 @@ class Worker
|
|||
return $new_retrial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of retrials for the current worker task
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public static function getRetrial(): int
|
||||
{
|
||||
$queue = DI::app()->getQueue();
|
||||
return $queue['retrial'] ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defers the current worker entry
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue