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
+1 -3
View File
@@ -556,11 +556,9 @@ def wsgibase(environ, responder):
return wsgibase(new_environ, responder)
if global_settings.web2py_crontype == 'soft':
# FIXME: calling softcron crondance in a new thread at every
# request is not a good idea in a long running process
cmd_opts = global_settings.cmd_options
newcron.softcron(global_settings.applications_parent,
apps=cmd_opts and cmd_opts.crontabs).start()
apps=cmd_opts and cmd_opts.crontabs)
return http_response.to(responder, env=env)