From d5749db0cd8a5a67ca9e8b2c255c82e1d04a97a9 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 14 Oct 2012 18:29:17 -0500 Subject: [PATCH] cron disabled by default unless -H --- VERSION | 2 +- gluon/widget.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 968fa96d..80582709 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.1.0 (2012-10-14 16:40:34) dev +Version 2.1.0 (2012-10-14 18:29:10) dev diff --git a/gluon/widget.py b/gluon/widget.py index 241e9fff..b3bfe65d 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -804,10 +804,10 @@ def console(): default=False, help=msg) - parser.add_option('-N', - '--no-cron', + parser.add_option('-H', + '--run-cron', action='store_true', - dest='nocron', + dest='runcron', default=False, help='do not start cron automatically') @@ -904,7 +904,7 @@ def console(): if options.cronjob: global_settings.cronjob = True # tell the world - options.nocron = True # don't start cron jobs + options.run = False # don't start cron jobs options.plain = True # cronjobs use a plain shell options.nobanner = True options.nogui = True @@ -1083,13 +1083,13 @@ def start(cron=True): return - # ## if -N or not cron disable cron in this *process* + # ## if -H cron is enabled in this *process* # ## if --softcron use softcron # ## use hardcron in all other cases - if cron and not options.nocron and options.softcron: + if cron and options.runcron and options.softcron: print 'Using softcron (but this is not very efficient)' global_settings.web2py_crontype = 'soft' - elif cron and not options.nocron: + elif cron and options.runcron: logger.debug('Starting hardcron...') global_settings.web2py_crontype = 'hard' newcron.hardcron(options.folder).start()