diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-10-02 06:05:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 06:05:36 +0300 |
commit | d86ad317bbfc09ac48400a563915c7c25fb226cf (patch) | |
tree | 97affab9d63e4ff5c4816d47ac3f0f4576bb1e23 /plugins/CoreConsole | |
parent | 378c403704552a88c6e01f955bc2379aaed8f172 (diff) |
Add option to archiver to not create archives for segments for today (#14834)
* add option to not archive segment for today
* better implementation
* added some logging and tests
* also archive when ts_last_edit is recent
* tweak message
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r-- | plugins/CoreConsole/Commands/CoreArchiver.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/CoreConsole/Commands/CoreArchiver.php b/plugins/CoreConsole/Commands/CoreArchiver.php index e1b3f21042..a4ce1d0269 100644 --- a/plugins/CoreConsole/Commands/CoreArchiver.php +++ b/plugins/CoreConsole/Commands/CoreArchiver.php @@ -52,6 +52,7 @@ class CoreArchiver extends ConsoleCommand $archiver->maxConcurrentArchivers = $input->getOption('concurrent-archivers'); $archiver->disableSegmentsArchiving = $input->getOption('skip-all-segments'); + $archiver->skipSegmentsToday = $input->getOption('skip-segments-today'); $segmentIds = $input->getOption('force-idsegments'); $segmentIds = explode(',', $segmentIds); @@ -101,6 +102,8 @@ class CoreArchiver extends ConsoleCommand 'If specified, all segments will be skipped during archiving.'); $command->addOption('force-idsites', null, InputOption::VALUE_OPTIONAL, 'If specified, archiving will be processed only for these Sites Ids (comma separated)'); + $command->addOption('skip-segments-today', null, InputOption::VALUE_NONE, + 'If specified, segments will be only archived for yesterday, but not today. If the segment was created or changed recently, then it will still be archived for today and the setting will be ignored for this segment.'); $command->addOption('force-periods', null, InputOption::VALUE_OPTIONAL, "If specified, archiving will be processed only for these Periods (comma separated eg. day,week,month,year,range)"); $command->addOption('force-date-last-n', null, InputOption::VALUE_REQUIRED, |