hrezaeianzadeh / django-screen-listing

1 stars 0 forks source link

celery and redis #2

Open parhamgh2020 opened 8 months ago

parhamgh2020 commented 8 months ago

Could you please clarify where you've implemented Celery in the project and how Redis is utilized?

hrezaeianzadeh commented 8 months ago

Redis is for celery, at first I wanted to implement make reservation api as a celery task but I did not have enough time and I forgot to remove celery from requirements. If make reservation was a celery task then it would support async calls however I made the ReservationViewset create endpoint atomic so if anyother requests wants to make a reservation at the same time then the resource used by the currenty request is locked and it wont make a reservation for it