<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Tag;
+use Friendica\Protocol\Relay;
class Cron
{
Worker::add(PRIORITY_LOW, 'PullDirectory');
}
- // Delete all done workerqueue entries
- Worker::add(PRIORITY_LOW, 'CleanWorkerQueue');
-
// Clear cache entries
Worker::add(PRIORITY_LOW, 'ClearCache');
Worker::add(PRIORITY_LOW, 'UpdatePhotoAlbums');
- // update nodeinfo data
- Worker::add(PRIORITY_LOW, 'NodeInfo');
-
- // Repair entries in the database
- Worker::add(PRIORITY_LOW, 'RepairDatabase');
-
- Worker::add(PRIORITY_LOW, 'Expire');
-
Worker::add(PRIORITY_LOW, 'ExpirePosts');
Worker::add(PRIORITY_LOW, 'ExpireConversations');
- Worker::add(PRIORITY_LOW, 'CleanItemUri');
+ Worker::add(PRIORITY_LOW, 'RemoveUnusedTags');
Worker::add(PRIORITY_LOW, 'RemoveUnusedContacts');
}
DI::config()->set('system', 'last_cron_daily', time());
+
+ // Resubscribe to relay servers
+ Relay::reSubscribe();
}
Logger::notice('end');
$processes = DBA::p("SHOW FULL PROCESSLIST");
while ($process = DBA::fetch($processes)) {
- if (($process['Command'] != 'Sleep') || ($process['Time'] < 60) || ($process['db'] != DBA::databaseName())) {
+ if (($process['Command'] != 'Sleep') || ($process['Time'] < 300) || ($process['db'] != DBA::databaseName())) {
continue;
}