# HG changeset patch # User Denis Laxalde # Date 1488806360 -3600 # Node ID 7694dcf5ad30205ade7522519baff9706d13ee85 # Parent b82cda5ba3bf2a20309dc14501de2d753f824bf1 [etwist] Do not call repository's start_looping_tasks anymore and warn about this We are about to drop this method from Repository class and replace it by a blocking alternative. This is not compatible with how things currently work in a Twisted server implementation. So do not start repository "looping tasks" in Twisted server anymore and issue a warning about this. If someone is interested in restoring the "all-in-one" behavior where the repository runs within a Twisted server, they may start by implementing repository looping tasks using a Twisted mechanism such as, e.g., http://twistedmatrix.com/documents/current/core/howto/time.html and eventually provide the repository with a compatible scheduler instance so that is can register its periodic tasks. At the moment, we lack resources to do this (and maintain the Twisted server of CubicWeb in general). Related to #17057223. diff -r b82cda5ba3bf -r 7694dcf5ad30 cubicweb/etwist/server.py --- a/cubicweb/etwist/server.py Thu Mar 09 09:16:00 2017 +0100 +++ b/cubicweb/etwist/server.py Mon Mar 06 14:19:20 2017 +0100 @@ -22,6 +22,7 @@ import threading from cgi import FieldStorage, parse_header from functools import partial +import warnings from cubicweb.statsd_logger import statsd_timeit @@ -68,7 +69,10 @@ if config.mode != 'test': reactor.addSystemEventTrigger('before', 'shutdown', self.shutdown_event) - self.appli.repo.start_looping_tasks() + warnings.warn( + 'twisted server does not start repository looping tasks anymore; ' + 'use the standalone "scheduler" command if needed' + ) self.set_url_rewriter() CW_EVENT_MANAGER.bind('after-registry-reload', self.set_url_rewriter)