mirror of
https://github.com/friendica/friendica
synced 2025-05-13 23:44:10 +02:00
Merge remote-tracking branch 'upstream/develop' into move-delivery
This commit is contained in:
commit
4eceb2d26f
37 changed files with 712 additions and 132 deletions
|
@ -37,7 +37,7 @@ class Cron
|
|||
{
|
||||
$a = DI::app();
|
||||
|
||||
$last = DI::config()->get('system', 'last_cron');
|
||||
$last = DI::keyValue()->get('last_cron');
|
||||
|
||||
$poll_interval = intval(DI::config()->get('system', 'cron_interval'));
|
||||
|
||||
|
@ -84,7 +84,7 @@ class Cron
|
|||
Worker::add(Worker::PRIORITY_LOW, 'PostUpdate');
|
||||
|
||||
// Hourly cron calls
|
||||
if (DI::config()->get('system', 'last_cron_hourly', 0) + 3600 < time()) {
|
||||
if ((DI::keyValue()->get('last_cron_hourly') ?? 0) + 3600 < time()) {
|
||||
|
||||
|
||||
// Update trending tags cache for the community page
|
||||
|
@ -105,7 +105,7 @@ class Cron
|
|||
// Clear cache entries
|
||||
Worker::add(Worker::PRIORITY_LOW, 'ClearCache');
|
||||
|
||||
DI::config()->set('system', 'last_cron_hourly', time());
|
||||
DI::keyValue()->set('last_cron_hourly', time());
|
||||
}
|
||||
|
||||
// Daily maintenance cron calls
|
||||
|
@ -145,12 +145,12 @@ class Cron
|
|||
// Resubscribe to relay servers
|
||||
Relay::reSubscribe();
|
||||
|
||||
DI::config()->set('system', 'last_cron_daily', time());
|
||||
DI::keyValue()->set('last_cron_daily', time());
|
||||
}
|
||||
|
||||
Logger::notice('end');
|
||||
|
||||
DI::config()->set('system', 'last_cron', time());
|
||||
DI::keyValue()->set('last_cron', time());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,7 +45,7 @@ class PullDirectory
|
|||
return;
|
||||
}
|
||||
|
||||
$now = (int)DI::config()->get('system', 'last-directory-sync', 0);
|
||||
$now = (int)(DI::keyValue()->get('last-directory-sync') ?? 0);
|
||||
|
||||
Logger::info('Synchronization started.', ['now' => $now, 'directory' => $directory]);
|
||||
|
||||
|
@ -64,7 +64,7 @@ class PullDirectory
|
|||
$result = Contact::addByUrls($contacts['results']);
|
||||
|
||||
$now = $contacts['now'] ?? 0;
|
||||
DI::config()->set('system', 'last-directory-sync', $now);
|
||||
DI::keyValue()->set('last-directory-sync', $now);
|
||||
|
||||
Logger::info('Synchronization ended', ['now' => $now, 'count' => $result['count'], 'added' => $result['added'], 'updated' => $result['updated'], 'unchanged' => $result['unchanged'], 'directory' => $directory]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue