This post makes reference to my previous post :
In the previous post, I was explaining that I have a class object called Item. This Item class has a method, call make_request which makes a GET request on a server. Now, I have implemented X Item objects which call make_request. The Item objects gonna call the method every X minutes, but these make_requests must be called independently.
Example with 3 Items:
- 14:00 - Item0.make_request
- 14:01 - Item1.make_request
- 14:02 - Item2.make_request
- 14:03 - Item0.make_request
- 14:04 - Item1.make_request
- 14:05 - Item2.make_request
- 14:06 - Item0.make_request
- 14:07 - Item1.make_request
- 14:08 - Item2.make_request
- 14:09 - Item0.make_request
- 14:10 - Item1.make_request
- 14:11 - Item2.make_request
- 14:12 - Item0.make_request
- 14:13 - Item1.make_request
- 14:14 - Item2.make_request ... etc
The principle is simple, the make_request method of the object Item_X must be called independently from the previous make_request method of the object Item_X-1. Indeed, the make_request method must start at M minute (every minute), 30 seconds for example. If it takes more than 30 seconds to get the result of the method, then it mustn't delay the next make_request (Multiprocess and queue?)
The answer to my previous post works but isn't enough robust :)
What do I need are possible solutions. I wonder if you have an idea to do it in python3. Can you provide me some advice (modules?) ?