mirror of
https://github.com/friendica/friendica
synced 2025-04-25 08:30:11 +00:00
Split cron tasks in several worker tasks
This commit is contained in:
parent
dae3bcce0f
commit
4bb70d7593
6 changed files with 290 additions and 173 deletions
|
@ -37,9 +37,6 @@ class ClearCache
|
|||
|
||||
// clear old cache
|
||||
DI::cache()->clear();
|
||||
if (DI::config()->get('system', 'optimize_tables')) {
|
||||
DBA::e("OPTIMIZE TABLE `cache`");
|
||||
}
|
||||
|
||||
// clear old item cache files
|
||||
clear_cache();
|
||||
|
@ -66,14 +63,8 @@ class ClearCache
|
|||
|
||||
// Delete the cached OEmbed entries that are older than three month
|
||||
DBA::delete('oembed', ["`created` < NOW() - INTERVAL 3 MONTH"]);
|
||||
if (DI::config()->get('system', 'optimize_tables')) {
|
||||
DBA::e("OPTIMIZE TABLE `oembed`");
|
||||
}
|
||||
|
||||
// Delete the cached "parse_url" entries that are older than three month
|
||||
DBA::delete('parsed_url', ["`created` < NOW() - INTERVAL 3 MONTH"]);
|
||||
if (DI::config()->get('system', 'optimize_tables')) {
|
||||
DBA::e("OPTIMIZE TABLE `parsed_url`");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue