I am trying to create a program which does periodic GET requests from around 10 websites and updates the information in a DB locally. Now when a user wants information, I will display the locally stored aggregate info.
I am trying to figure out the best way to run these periodic GET requests in FastAPI. I am new to FastAPI and am still trying to figure things out.
After some research I can think of two options:
- Using a background task endpoint which runs periodically and does the GET requests one by one from each website.
- Using Celery to do these GET requests
If anyone has any experience of doing something similar I am trying to figure out the best way to do this, or how would I go about finding out the best way to do this?