Celery: do not register class-based task manually
These tasks are being registered automatically now because they are
function-based tasks.
@@ -10,20 +10,3 @@ class Config(AppConfig):
name = 'readthedocs.builds'
label = 'builds'
verbose_name = _("Builds")
-
- def ready(self):
- from readthedocs.worker import app
-
- try:
- from readthedocsext.monitoring.metrics.tasks import (
- Metrics1mTask,
- Metrics5mTask,
- Metrics10mTask,
- Metrics30mTask,
- )
- app.tasks.register(Metrics1mTask)
- app.tasks.register(Metrics5mTask)
- app.tasks.register(Metrics10mTask)
- app.tasks.register(Metrics30mTask)
- except (ModuleNotFoundError, ImportError):
- log.warning('Metrics tasks could not be imported.')
