Skip to content

Commit

Permalink
Move some tasks to new standalone index_sol worker (#7856)
Browse files Browse the repository at this point in the history
  • Loading branch information
theoilie authored Mar 15, 2024
1 parent 9610aa5 commit 5ab22b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/discovery-provider/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ else
# start worker dedicated to indexing ACDC
audius_service=worker celery -A src.worker.celery worker -Q index_nethermind --loglevel "$audius_discprov_loglevel" --hostname=index_nethermind --concurrency 1 2>&1 | tee >(logger -t index_nethermind_worker) &

# start worker dedicated to indexing user bank and payment router
audius_service=worker celery -A src.worker.celery worker -Q index_sol --loglevel "$audius_discprov_loglevel" --hostname=index_sol --concurrency 1 2>&1 | tee >(logger -t index_sol_worker) &

# start other workers with remaining CPUs
audius_service=worker celery -A src.worker.celery worker --max-memory-per-child 300000 --loglevel "$audius_discprov_loglevel" --concurrency=$(($(nproc) - 5)) 2>&1 | tee >(logger -t worker) &

Expand Down
4 changes: 2 additions & 2 deletions packages/discovery-provider/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,5 +535,5 @@ def __init__(self, *args, **kwargs):
# Start tasks that should fire upon startup
celery.send_task("cache_entity_counts")
celery.send_task("index_nethermind", queue="index_nethermind")
celery.send_task("index_user_bank", queue="index_nethermind")
celery.send_task("index_payment_router", queue="index_nethermind")
celery.send_task("index_user_bank", queue="index_sol")
celery.send_task("index_payment_router", queue="index_sol")
Original file line number Diff line number Diff line change
Expand Up @@ -989,5 +989,5 @@ def index_payment_router(self):
if have_lock:
update_lock.release()
celery.send_task(
"index_payment_router", countdown=0.5, queue="index_nethermind"
"index_payment_router", countdown=0.5, queue="index_sol"
)
2 changes: 1 addition & 1 deletion packages/discovery-provider/src/tasks/index_user_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,5 +1120,5 @@ def index_user_bank(self):
if have_lock:
update_lock.release()
celery.send_task(
"index_user_bank", countdown=0.5, queue="index_nethermind"
"index_user_bank", countdown=0.5, queue="index_sol"
)

0 comments on commit 5ab22b0

Please sign in to comment.