# HG changeset patch # User Denis Laxalde # Date 1488804591 -3600 # Node ID 5236ce988805d44bac9b6fde1c378aa701c6c0d2 # Parent 26453d9467f6996997949c7261320eeccaa5c823 [pyramid] Drop call to repository's start_looping_tasks method and warn about this We are about to drop the start_looping_tasks method and running "looping tasks" along the WSGI application is not a very good idea. So issue a warning pointing to the forthcoming "scheduler" command. Related to #17057223. diff -r 26453d9467f6 -r 5236ce988805 cubicweb/pyramid/pyramidctl.py --- a/cubicweb/pyramid/pyramidctl.py Mon Mar 06 15:22:16 2017 +0100 +++ b/cubicweb/pyramid/pyramidctl.py Mon Mar 06 13:49:51 2017 +0100 @@ -35,6 +35,7 @@ import time import threading import subprocess +import warnings from cubicweb import ExecutionError from cubicweb.cwconfig import CubicWebConfiguration as cwcfg @@ -338,8 +339,11 @@ host = cwconfig['interface'] port = cwconfig['port'] or 8080 repo = app.application.registry['cubicweb.repository'] + warnings.warn( + 'the "pyramid" command does not start repository "looping tasks" ' + 'anymore; use the standalone "scheduler" command if needed' + ) try: - repo.start_looping_tasks() waitress.serve(app, host=host, port=port) finally: repo.shutdown()