sforkowany z mirror/friendica
Unclaim on end / don't refetch
rodzic
069786cd7f
commit
8148d9dc9d
|
@ -96,7 +96,8 @@ class Worker
|
|||
|
||||
// We fetch the next queue entry that is about to be executed
|
||||
while ($r = self::workerProcess()) {
|
||||
$refetched = false;
|
||||
// Don't refetch when a worker fetches tasks for multiple workers
|
||||
$refetched = DI::config()->get('system', 'worker_multiple_fetch');
|
||||
foreach ($r as $entry) {
|
||||
// Assure that the priority is an integer value
|
||||
$entry['priority'] = (int)$entry['priority'];
|
||||
|
@ -143,6 +144,7 @@ class Worker
|
|||
// Quit the worker once every cron interval
|
||||
if (time() > ($starttime + (DI::config()->get('system', 'cron_interval') * 60))) {
|
||||
Logger::info('Process lifetime reached, respawning.');
|
||||
self::unclaimProcess();
|
||||
self::spawnWorker();
|
||||
return;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue