mirror of
https://github.com/friendica/friendica
synced 2025-05-12 04:24:11 +02:00
Reformat code
- Reformat Console\Storage - Reformat Core\StorageManager - Simplify logic in Worker\CronJobs
This commit is contained in:
parent
3a0a6cd659
commit
f225a6c51a
3 changed files with 44 additions and 56 deletions
|
@ -35,54 +35,42 @@ class CronJobs
|
|||
|
||||
Logger::log("Starting cronjob " . $command, Logger::DEBUG);
|
||||
|
||||
// Call possible post update functions
|
||||
// see src/Database/PostUpdate.php for more details
|
||||
if ($command == 'post_update') {
|
||||
PostUpdate::update();
|
||||
return;
|
||||
}
|
||||
switch($command) {
|
||||
case 'post_update':
|
||||
PostUpdate::update();
|
||||
break;
|
||||
|
||||
// update nodeinfo data
|
||||
if ($command == 'nodeinfo') {
|
||||
nodeinfo_cron();
|
||||
return;
|
||||
}
|
||||
case 'nodeinfo':
|
||||
nodeinfo_cron();
|
||||
break;
|
||||
|
||||
// Expire and remove user entries
|
||||
if ($command == 'expire_and_remove_users') {
|
||||
self::expireAndRemoveUsers();
|
||||
return;
|
||||
}
|
||||
case 'expire_and_remove_users':
|
||||
self::expireAndRemoveUsers();
|
||||
break;
|
||||
|
||||
if ($command == 'update_contact_birthdays') {
|
||||
Contact::updateBirthdays();
|
||||
return;
|
||||
}
|
||||
case 'update_contact_birthdays':
|
||||
Contact::updateBirthdays();
|
||||
break;
|
||||
|
||||
if ($command == 'update_photo_albums') {
|
||||
self::updatePhotoAlbums();
|
||||
return;
|
||||
}
|
||||
case 'update_photo_albums':
|
||||
self::updatePhotoAlbums();
|
||||
break;
|
||||
|
||||
// Clear cache entries
|
||||
if ($command == 'clear_cache') {
|
||||
self::clearCache($a);
|
||||
return;
|
||||
}
|
||||
case 'clear_cache':
|
||||
self::clearCache($a);
|
||||
break;
|
||||
|
||||
// Repair missing Diaspora values in contacts
|
||||
if ($command == 'repair_diaspora') {
|
||||
self::repairDiaspora($a);
|
||||
return;
|
||||
}
|
||||
case 'repair_diaspora':
|
||||
self::repairDiaspora($a);
|
||||
break;
|
||||
|
||||
// Repair entries in the database
|
||||
if ($command == 'repair_database') {
|
||||
self::repairDatabase();
|
||||
return;
|
||||
}
|
||||
case 'repair_database':
|
||||
self::repairDatabase();
|
||||
break;
|
||||
|
||||
Logger::log("Xronjob " . $command . " is unknown.", Logger::DEBUG);
|
||||
default:
|
||||
Logger::log("Xronjob " . $command . " is unknown.", Logger::DEBUG);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue