The priority is now a class constant

This commit is contained in:
Michael 2022-10-17 05:49:55 +00:00
parent b33b70f0ab
commit 018858934b
46 changed files with 148 additions and 151 deletions

View file

@ -102,7 +102,7 @@ class GServer
return;
}
Worker::add(PRIORITY_LOW, 'UpdateGServer', $url, $only_nodeinfo);
Worker::add(Worker::PRIORITY_LOW, 'UpdateGServer', $url, $only_nodeinfo);
}
/**
@ -2108,10 +2108,10 @@ class GServer
while ($gserver = DBA::fetch($gservers)) {
Logger::info('Update peer list', ['server' => $gserver['url'], 'id' => $gserver['id']]);
Worker::add(PRIORITY_LOW, 'UpdateServerPeers', $gserver['url']);
Worker::add(Worker::PRIORITY_LOW, 'UpdateServerPeers', $gserver['url']);
Logger::info('Update directory', ['server' => $gserver['url'], 'id' => $gserver['id']]);
Worker::add(PRIORITY_LOW, 'UpdateServerDirectory', $gserver);
Worker::add(Worker::PRIORITY_LOW, 'UpdateServerDirectory', $gserver);
$fields = ['last_poco_query' => DateTimeFormat::utcNow()];
self::update($fields, ['nurl' => $gserver['nurl']]);