better cron limits number of threads, thanks P.Pastori

This commit is contained in:
mdipierro
2019-05-22 21:44:42 -07:00
parent f258cbecee
commit 94af61e732
5 changed files with 269 additions and 156 deletions
+3 -5
View File
@@ -496,7 +496,7 @@ class web2pyDialog(object):
self.update_schedulers()
# softcron is stopped with HttpServer, thus if starting again
# need to reset newcron._cron_stopping to re-enable cron
# need to reset newcron._stopping to re-enable cron
if self.options.soft_cron:
newcron.reset()
@@ -746,11 +746,9 @@ def start():
if options.cron_run:
# run cron (extcron) and exit
logger.debug('Starting extcron...')
logger.debug('Running extcron...')
global_settings.web2py_crontype = 'external'
extcron = newcron.extcron(options.folder, apps=options.crontabs)
extcron.start()
extcron.join()
newcron.extcron(options.folder, apps=options.crontabs)
return
if not options.with_scheduler and options.schedulers: