cubicweb #3790327 Introduce a simple task management system [open]

When running distributed (many all-in-one instances or just plain wsgi), the current task API does not work as it is process bound.

E.g. the task that wipes expired sessions: it makes no sense that it be independently executed on many cubicweb processes.

Hence we need the simplest possible task system that could work: using the database as a data bus for tasks. I propose taking parts of the worker cube and putting them into cubicweb core.

This should cover the current (basic) needs.

High-performance, low-latency task management could of course be tackled with an external lib (e.g. celery) but this is much more involved and should not tried right away as an implementation for the core APIs.

The APIs parts of this ticket might take the form of a CWEP.
The implementation would be based on the worker cube.

prioritynormal
typetask
done in<not specified>
load5.000
load left5.000
closed by<not specified>