OkunaOrg / okuna-api

🤖 The Okuna Social Network API
https://okuna.io
MIT License
239 stars 81 forks source link

♻️ Migrate from RQ to Celery for async jobs #766

Open jozsefsallai opened 2 years ago

jozsefsallai commented 2 years ago

TODO

*) There are a few unit tests regarding media uploads in posts that will also check if the post is in "pending" state; since the @celery_use_eager decorator will make it so jobs are run as if they were regular synchronous function calls, the API endpoint will not send back a response until the post media is processed, so the post is never in "pending" state. For now, I've uncommented the lines that test for the pending state, but we will need to employ a strategy to monitor the relevant job and block the unit test until it finishes, instead of blocking the execution of the API endpoint.