Skip to content

Commit

Permalink
Merge pull request #209 from jpwhite4/optimizeflags
Browse files Browse the repository at this point in the history
Add option to agg script to configure optimise table (backport to 8.6)
  • Loading branch information
jpwhite4 authored Nov 25, 2019
2 parents 2d98b06 + 439aa1c commit ba3edcd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions background_scripts/aggregate_supremm.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'h' => 'help',
'a:' => 'append:',
'u:' => 'useetllog:',
't:' => 'analyze-tables',
'q' => 'quiet',
'v' => 'verbose',
'd' => 'debug'
Expand All @@ -28,6 +29,10 @@ function usage_and_exit()
-h, --help
Display this help
-t, --analyze-tables=YESNO
whether to override the table analysis settings in the aggregation.
Default is to leave the settings unmodified.
-a, --append
this flag is deprecated and is ignored.
Expand Down Expand Up @@ -58,6 +63,10 @@ function usage_and_exit()
case 'help':
usage_and_exit();
break;
case 't':
case 'analyze-tables':
$conf['analyze_table'] = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
break;
case 'q':
case 'quiet':
$conf['consoleLogLevel'] = CCR\Log::ERR;
Expand Down Expand Up @@ -104,6 +113,10 @@ function run_aggregation($sourceTable, $pipeline)
'default-module-name' => 'xdmod'
);

if (isset($conf['analyze_table'])) {
$scriptOptions['option-overrides']['analyze_table'] = $conf['analyze_table'];
}

if ($last_modified !== null) {
$scriptOptions['last-modified-start-date'] = $last_modified;
}
Expand Down

0 comments on commit ba3edcd

Please sign in to comment.