Very new to celery with django and I see it being done both ways and not sure if it’s a matter of preference or if there is a specific purpose behind it. I’m using the latest version of celery and trying to update our current code base from 2.x – I want to keep in mind what is the better route to go with while thinking about writing tests for tasks.
Share
When you precede your task with
@periodic_taskdecorator, it is scheduled for celerybeat anyway. To my mind, using decorator makes your code more readable.