Moving periodic download logic into manager so the manager can call it when it is enabled.

This commit is contained in:
Roland 2022-09-25 17:27:48 -06:00
parent 00acd9d891
commit e80f24f690
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
4 changed files with 40 additions and 19 deletions

View file

@ -57,7 +57,7 @@ async def call_single_file(url) -> bytes:
See https://github.com/gildas-lormeau/SingleFile
"""
logger.info(f'archiving {url}')
cmd = ['/usr/src/app/node_modules/single-file/cli/single-file', url,
cmd = ['/usr/src/app/node_modules/single-file-cli/single-file', url,
'--browser-executable-path', '/usr/bin/chromium-browser', '--browser-args', '["--no-sandbox"]',
'--dump-content']
logger.debug(f'archive cmd: {cmd}')
@ -139,4 +139,4 @@ async def post_archive(request: Request):
if __name__ == '__main__':
app.run('0.0.0.0', 8080, workers=4)
app.run('0.0.0.0', 8080, workers=4, auto_reload=True)