зеркало из https://github.com/mozilla/kitsune.git
Add rscripts variable for crontab.
They get to run with whatever user is specified in crontab.tpl.
This commit is contained in:
Родитель
597cc0c5e8
Коммит
5305b00131
|
@ -37,7 +37,7 @@ HOME = /tmp
|
|||
0 0 * * * {{ cron }} rebuild_kb
|
||||
0 22 * * * {{ cron }} get_customercare_stats
|
||||
42 22 * * * {{ django }} cleanup
|
||||
30 3 * * * root {{ scripts }} scripts/l10n_completion.py --truncate 30 locale media/l10n_history.json media/l10n_summary.json
|
||||
30 3 * * * root {{ rscripts }} scripts/l10n_completion.py --truncate 30 locale media/l10n_history.json media/l10n_summary.json
|
||||
|
||||
# Once per week.
|
||||
21 03 * * 3 {{ django }} purge_hashes
|
||||
|
|
|
@ -33,9 +33,13 @@ def main():
|
|||
opts.kitsune, python_path, opts.python),
|
||||
}
|
||||
ctx['cron'] = '%s cron' % ctx['django']
|
||||
ctx['rscripts'] = ctx['scripts']
|
||||
|
||||
if opts.user:
|
||||
for k, v in ctx.iteritems():
|
||||
if k == 'rscripts':
|
||||
# rscripts get to run as whatever user is specified in crontab.tpl
|
||||
continue
|
||||
ctx[k] = '%s %s' % (opts.user, v)
|
||||
|
||||
# Needs to stay below the opts.user injection.
|
||||
|
|
Загрузка…
Ссылка в новой задаче