Skip to content

Commit

Permalink
fix: Correct jobs creator for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
antonko committed Apr 2, 2024
1 parent 9095ac2 commit b05fa43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/worker/task_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ async def pattern_peak(redis_pool: ArqRedis, max_tasks_per_minute: int):

async def pattern_random_distribution(redis_pool: ArqRedis, max_tasks_per_minute: int):
total_minutes = 10
for _ in range(total_minutes):
for minute in range(total_minutes):
num_tasks = random.randint(0, max_tasks_per_minute)
for _ in range(num_tasks):
await enqueue_job(redis_pool, True)

if _ < total_minutes - 1:
if minute < total_minutes - 1:
await asyncio.sleep(60)


Expand Down

0 comments on commit b05fa43

Please sign in to comment.