Skip to content

Commit

Permalink
Smaller task pool
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjp93 committed Oct 15, 2024
1 parent c6983bd commit 415f324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kill_timeout = "5s"
[processes]
beat = "celery -A lolsite beat -l INFO"
web = "gunicorn --bind :8000 --workers 10 lolsite.wsgi:application"
worker = "celery -A lolsite worker --concurrency=20 --loglevel=INFO"
worker = "celery -A lolsite worker --concurrency=12 --loglevel=INFO"

[[services]]
protocol = "tcp"
Expand Down
2 changes: 1 addition & 1 deletion match/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def get_jobs(qs, start_time):
summoner.huge_match_import_at = import_time
summoner.save(update_fields=["huge_match_import_at"])

for _ in celery_task_pool(get_jobs(qs.iterator(2000), thresh), pool_size=15):
for _ in celery_task_pool(get_jobs(qs.iterator(2000), thresh), pool_size=10):
i += 1
if i % 100 == 0:
elapsed = time.perf_counter() - elapsed_start
Expand Down

0 comments on commit 415f324

Please sign in to comment.