No more remora in update scripts.
This commit is contained in:
Родитель
bba7ad9519
Коммит
fbcfe8faa3
|
@ -22,16 +22,12 @@ HOME=/tmp
|
|||
|
||||
#every 3 hours
|
||||
20 */3 * * * %(z_cron)s compatibility_report
|
||||
# clouserw commented this out
|
||||
#20 */3 * * * %(remora)s; php -f compatibility_report.php
|
||||
|
||||
#every 4 hours
|
||||
40 */4 * * * %(django)s clean_redis
|
||||
|
||||
#twice per day
|
||||
# Use system python to use an older version of sqlalchemy than what is in our venv
|
||||
# commented out 2013-03-28, clouserw
|
||||
#25 1,13 * * * %(remora)s; /usr/bin/python import-personas.py
|
||||
# Add slugs after we get all the new personas.
|
||||
# commented out 2013-03-28, clouserw
|
||||
#25 2,14 * * * %(z_cron)s addons_add_slugs
|
||||
|
|
|
@ -10,11 +10,9 @@ def main():
|
|||
parser = OptionParser()
|
||||
parser.add_option("-z", "--zamboni",
|
||||
help="Location of zamboni (required)")
|
||||
parser.add_option("-r", "--remora",
|
||||
help="Location of remora bin dir (required)")
|
||||
parser.add_option("-u", "--user",
|
||||
help=("Prefix cron with this user. "
|
||||
"Only define for cron.d style crontabs"))
|
||||
"Only define for cron.d style crontabs"))
|
||||
parser.add_option("-p", "--python", default="/usr/bin/python2.6",
|
||||
help="Python interpreter to use")
|
||||
parser.add_option("-d", "--deprecations", default=False,
|
||||
|
@ -22,14 +20,13 @@ def main():
|
|||
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
if not opts.zamboni or not opts.remora:
|
||||
parser.error("-z and -r must be defined")
|
||||
if not opts.zamboni:
|
||||
parser.error("-z must be defined")
|
||||
|
||||
if not opts.deprecations:
|
||||
opts.python += ' -W ignore::DeprecationWarning'
|
||||
|
||||
ctx = {'django': 'cd %s; %s manage.py' % (opts.zamboni, opts.python),
|
||||
'remora': 'cd %s' % opts.remora}
|
||||
ctx = {'django': 'cd %s; %s manage.py' % (opts.zamboni, opts.python)}
|
||||
ctx['z_cron'] = '%s cron' % ctx['django']
|
||||
|
||||
if opts.user:
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
SRC_DIR = "/data/addons-dev/src/addons-dev.allizom.org/zamboni"
|
||||
WWW_DIR = "/data/addons-dev/www/addons-dev.allizom.org/zamboni"
|
||||
|
||||
REMORA_DIR = "/data/addons-dev/src/addons-dev.allizom.org-remora"
|
||||
|
||||
REMOTE_APP = "/data/www/addons-dev.allizom.org/zamboni"
|
||||
REMOTE_UPDATE_SCRIPT = "/data/bin/update-www.sh"
|
||||
|
||||
|
|
|
@ -120,8 +120,8 @@ def disable_cron():
|
|||
def install_cron():
|
||||
with lcd(settings.SRC_DIR):
|
||||
local('%s ./scripts/crontab/gen-cron.py '
|
||||
'-z %s -r %s/bin -u apache -p %s > /etc/cron.d/.%s' %
|
||||
(settings.PYTHON, settings.SRC_DIR, settings.REMORA_DIR,
|
||||
'-z %s -u apache -p %s > /etc/cron.d/.%s' %
|
||||
(settings.PYTHON, settings.SRC_DIR,
|
||||
settings.PYTHON, settings.CRON_NAME))
|
||||
|
||||
local('mv /etc/cron.d/.%s /etc/cron.d/%s' % (settings.CRON_NAME,
|
||||
|
|
|
@ -116,8 +116,8 @@ def disable_cron(ctx):
|
|||
def install_cron(ctx):
|
||||
with ctx.lcd(settings.SRC_DIR):
|
||||
ctx.local('%s ./scripts/crontab/gen-cron.py '
|
||||
'-z %s -r %s/bin -u apache -p %s > /etc/cron.d/.%s' %
|
||||
(settings.PYTHON, settings.SRC_DIR, settings.REMORA_DIR,
|
||||
'-z %s -u apache -p %s > /etc/cron.d/.%s' %
|
||||
(settings.PYTHON, settings.SRC_DIR,
|
||||
settings.PYTHON, settings.CRON_NAME))
|
||||
|
||||
ctx.local('mv /etc/cron.d/.%s /etc/cron.d/%s' % (settings.CRON_NAME,
|
||||
|
|
Загрузка…
Ссылка в новой задаче