Closed nemesifier closed 7 months ago
I think the problem I mentioned above may not be caused by the naming of the tasks, but nonetheless it would be good to make sure to go ahead with the change anyway to maintain consistency across the codebase: we don't have any celery task which is named with a leading underscore.
The functions that write metrics can be flagged as private as we may change this mechanism over time, but we haven't been changing celery tasks very often, usually once a task is added we almost never remove it or rename it except on rare occasions.
Given the following ROUTES setting:
We would expect that tasks are routed to the manager queue but the following two tasks are still routed to the default queue:
openwisp_monitoring.monitoring.tasks._timeseries_write
openwisp_monitoring.monitoring.tasks._timeseries_batch_write
This has unexpected consequences.
It may be caused by the leading underscore in the task name. If that's the case it would be appropriate to remove the leading underscore and make sure functions used internally are using the underscore.