Skip to content

Commit

Permalink
fix: infinite creation of jobs for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
antonko committed Apr 2, 2024
1 parent b1453c1 commit 9b4a9ef
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions backend/src/worker/task_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ async def pattern_random_distribution(redis_pool: ArqRedis, max_tasks_per_minute
async def main():
redis_pool = await create_pool(get_redis_settings(), default_queue_name=settings.queue_name)

await pattern_hill(redis_pool, 20)
await pattern_increasing_errors(redis_pool, 20)
await pattern_random_distribution(redis_pool, 20)
await pattern_peak(redis_pool, 20)

while True:
await pattern_hill(redis_pool, 20)
await pattern_random_distribution(redis_pool, 20)
await pattern_increasing_errors(redis_pool, 20)
await pattern_random_distribution(redis_pool, 20)
await pattern_peak(redis_pool, 20)

if __name__ == "__main__":
asyncio.run(main())

0 comments on commit 9b4a9ef

Please sign in to comment.