The task at hand:
There is a MySQL table in which user activity is exposed as a row. This action needs to be processed later.
id | activity_type | activity_data | creation_time | status 23 EMAIL {....... } 2013-02-01 UNPROCESSED
Processing without celery:
- Use a script that collects N records for processing, processes them, and then updates the PROCESSED status for the processed records.
How can I achieve the same result using Celery, I would like to use the same functionality to mark tasks instead of using a broker? those. the add โ task accepts the 10 oldest rows added to the mysql table with UNPROCESSED status, which also has data associated with the task.
at the end of the task โ mark the lines as PROCESSED.
How can celery say that instead of pushing a task to the broker, he should retrieve the tasks from the MySQL table?
I start at Celery, so I donโt realize all its functionality. Using MySQL as a broker is not recommended, but I would like to know about the possibility.
source share