Commit e7fc7907 authored by Michał Woźniak's avatar Michał Woźniak

WIP: auto-archiving should now get triggered after log ingestion (ref. #1)

parent db8e900b
......@@ -99,6 +99,15 @@ class Configuration(import_logs.Configuration):
"contain any '/' characters."
)
self.parser.add_option(
'--no-auto-archive',
dest='auto_archive',
action='store_false',
default=True
help="Do not automatically run auto-archiving of Matomo reports. By default "
"auto-archiving is triggered after a batch of logfiles is ingested."
)
# parse the stuff
self._parse_args(self.parser, argv)
......@@ -313,6 +322,11 @@ while True:
# all have either been processed, or errored out
logfiles_free = []
# fire up archiving
if config.options.auto_archive:
apiresult = matomo._call_api('CoreAdminHome.runCronArchiving')
logging.debug(apiresult)
# get the watches going again
setup_watches()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment