1. 10 Mar, 2017 21 commits
  2. 09 Mar, 2017 3 commits
  3. 10 Mar, 2017 1 commit
  4. 21 Feb, 2017 1 commit
    • Denis Laxalde's avatar
      [server] Add a "scheduler" command to run repository scheduler · 88ed82a25f8a
      Denis Laxalde authored
      This commands starts the repository scheduler as a standalone process that
      should complement a CubicWeb web instance running as a WSGI application.
      
      Added a log message in repository's shutdown method to help testing the
      command (i.e. make sure the method is called after the scheduler stopped).
      
      Related to #17057223.
      88ed82a25f8a
  5. 06 Mar, 2017 5 commits
    • Denis Laxalde's avatar
      [cwconfig] Do not instantiate a repo with a scheduler in repository method · fe057cb231b6
      Denis Laxalde authored
      None of the caller of this method need the repository to have a scheduler and
      having a scheduler should be something that's explicitly requested.
      fe057cb231b6
    • Denis Laxalde's avatar
      116005b5fce9
    • Denis Laxalde's avatar
      [server] Drop utils's LoopTask and TasksManager classes not used anymore · 7b975655d0ae
      Denis Laxalde authored
      Related to 17057223.
      7b975655d0ae
    • Denis Laxalde's avatar
      [server] replace repository's tasks manager by a scheduler · f7ff5217a02f
      Denis Laxalde authored
      Repository() does not accept anymore a 'tasks_manager' argument but rather a
      'scheduler' argument which is expected to be an instance of sched.scheduler
      class. The drop the _tasks_manager attribute of the repository and adjust all
      internal usages of it. In particular, in the 'repo_stats' service we do not
      export 'looping_tasks' statistics anymore as there's no way to retrieve this
      anymore from a web instance.
      
      Closes #17057223.
      f7ff5217a02f
    • Denis Laxalde's avatar
      [server] introduce a scheduler class to run repository "looping tasks" · d2888fee6031
      Denis Laxalde authored
      We just use the sched module from the standard library and introduce a tiny
      Python2/3 compatibility layer (more for convenience actually). The "looping"
      aspect of tasks (previously in LoopTask class) is re-implemeted as a
      `schedule_periodic_task` function. This is a reasonably thin layer as compared
      to LoopTask/TasksManager classes. Only the "restart" aspect of LoopTask is no
      longer present as I'm not sure it's worth keeping.
      
      The advantage of using this (in addition to eventually dropping our custom
      code) is that this scheduler class provides a `run` method that blocks the
      process while running tasks in its queue. So we can rely on this to have a
      'scheduler' ctl command (see forthcoming patch) that would only run "looping
      tasks" without having to implement the "blocking" aspect ourself.
      
      Related to #17057223.
      d2888fee6031
  6. 16 Feb, 2017 2 commits
  7. 06 Mar, 2017 1 commit
    • Denis Laxalde's avatar
      [etwist] Do not call repository's start_looping_tasks anymore and warn about this · 7694dcf5ad30
      Denis Laxalde authored
      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.
      7694dcf5ad30
  8. 09 Mar, 2017 1 commit
  9. 07 Mar, 2017 2 commits
  10. 06 Mar, 2017 3 commits