HomeSoftware Heritage

Explicitly register class-based tasks inheriting from our own class

Description

Explicitly register class-based tasks inheriting from our own class

This lets go of the metaclass madness imported from Celery 3, and goes for an
explicit task registration mechanism as advised in Celery 4.

We do explicit registration of all our tasks in the 'worker ready' signal, just
before they automatically subscribe to the task queues.

Unfortunately that signal is not emitted by the "test fixture" worker, so we
need to explicitly register class-based tasks that are being used in tests. This
doesn't show up for functions as the @task decorator handles registration.

Details

Provenance
olasdAuthored on Dec 18 2018, 5:08 PM
olasdPushed on Dec 20 2018, 10:53 AM
Parents
rDSCH05c641b6af9a: Refactor a bit the 'swh-scheduler task list-pending' cli tool
Branches
Unknown
Tags
Unknown
References
tag: v0.0.38
Build Status
Buildable 3188
Build 4085: test-and-build