[wsgiapp] option to disable looping task default tip
authorArthur Lutz <arthur.lutz@logilab.fr>
Tue, 10 Dec 2019 12:47:39 +0100
changeset 135 66dff7e6535d
parent 134 327f13314b72
[wsgiapp] option to disable looping task
cubicweb/uwsgi/wsgiapp.py
pillar.example
--- a/cubicweb/uwsgi/wsgiapp.py	Fri Dec 06 17:53:01 2019 +0100
+++ b/cubicweb/uwsgi/wsgiapp.py	Tue Dec 10 12:47:39 2019 +0100
@@ -11,5 +11,9 @@
 
 application = wsgi_application_from_cwconfig(cwconfig,)
 repo = application.application.registry['cubicweb.repository']
+{% if 'disable_uwsgi_looping_task' in pillar and pillar['disable_uwsgi_looping_task'] %}
+# disabled looping task :
+# repo.start_looping_tasks()
+{% else %}
 repo.start_looping_tasks()
-
+{% endif %}
--- a/pillar.example	Fri Dec 06 17:53:01 2019 +0100
+++ b/pillar.example	Tue Dec 10 12:47:39 2019 +0100
@@ -28,6 +28,10 @@
 ## 'cubicweb_repo' option is ignored
 #cubicweb_version: 3.20.5-1
 
+## you may disable looping tasks (for example in cubicweb >= 3.26)
+## default is False
+#disable_uwsgi_looping_task: True
+
 ## You can add extra repository sources
 ## when extra_sources is defined and debian_pkgrepos is undefined the "all dependencies are
 ## availble in that extra source" scenario is used, no public cubicweb debian repository