backtrackbaba / cowin

Python wrapper for CoWin API's
MIT License
42 stars 18 forks source link

Slots are not getting updated when checked at an interval #19

Closed Tamoghna-Saha closed 3 years ago

Tamoghna-Saha commented 3 years ago

I am passing the availability code chunk through an infinite loop to check for the slots but not getting real-time updates. It was only after I encountered a connection error and then waited for 30 sec to obtain the updated information.

Example: I got 35 slots at a center for a particular day and then it was showing the same number for over a minute, even though the slot was full. It was only after I encountered a connection error and restarted when I noticed the updated slot information.

backtrackbaba commented 3 years ago

Hi @Tamoghna-Saha, the upstream data from Cowin is being cached for 30 mins due to which you are getting the same number even after the slots are full.

A lot of people have raised the issue here and are awaiting a response from the CoWin team regarding any changes that they have planned with the caching timeout.

Also, while running an infinite loop, keep in mind the rate limit of 100 API calls every 5 mins imposed by CoWin.