Let caller override config paths for luigi overnight scripts

This commit is contained in:
Lance Edgar 2022-11-27 12:47:39 -06:00
parent ebf94fb7dc
commit a9bbee572a
3 changed files with 9 additions and 5 deletions

View file

@ -74,7 +74,9 @@ def install_luigi(c, envroot, luigi='luigi', user='rattail', db_connection=None)
def install_overnight_script(c, envroot, user='rattail', automation='All',
email_key=None,
luigi=False, cron=True, restart=True):
luigi=False,
cron=True, cron_conf='app/cron.conf',
restart=True, restart_conf='app/silent.conf'):
"""
Install an overnight automation script
"""
@ -97,6 +99,7 @@ def install_overnight_script(c, envroot, user='rattail', automation='All',
'{}/{}'.format(appdir, filename),
use_sudo=True, owner=user, mode='0755',
context={'envroot': envroot,
'overnight_conf': cron_conf,
'automation': automation,
'email_key': email_key})
@ -108,6 +111,7 @@ def install_overnight_script(c, envroot, user='rattail', automation='All',
use_sudo=True, owner=user, mode='0755',
context={'envroot': envroot,
'appdir': appdir,
'overnight_conf': restart_conf,
'automation': automation,
'email_key': email_key})