Commit 3c43ae61 authored by Michał Woźniak's avatar Michał Woźniak

WIP: working on auto-archiver (ref. #1)

parent efc7f8be
......@@ -324,8 +324,21 @@ while True:
# fire up archiving
if config.options.auto_archive:
apiresult = matomo._call_api('CoreAdminHome.runCronArchiving')
logging.debug(apiresult)
logging.info('running auto-archiver...')
try:
args = {
'module' : 'API',
'format' : 'console',
'method' : 'CoreAdminHome.runCronArchiving',
'filter_limit' : '-1',
'token_auth': config.options.matomo_token_auth
}
apiresult = matomo._call('/', args)
logging.debug(apiresult)
except Exception as e:
if config.options.exit_on_error:
else:
logging.error(e)
# 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