Alex M
01/14/2024, 10:36 PMrate_limit
controls how many tasks can be submitted at the same time. It uses the Slot Decay Per Second to determine the throughput and occupy
to determine how many tasks go in. I created simple test code with 2 tasks query and parse. Query takes 3 seconds, parse takes 1 second. I execute the tasks in a flow with rate_limit(occupy=3)
. My concurrency limit is at 5 and my decay is set to 0.5.
I expected the execution graph to be groups of 3 tasks (because occupy=3) every 2 seconds ( because time to release slots is 1/0.5). Why do I see one task submitted every 2 seconds?