Skip to content

Commit

Permalink
feat: phone call concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
okradze committed Jan 8, 2024
1 parent 70d3fb3 commit 12ed3fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/worker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def register_campaign_phone_call_tasks():
autoretry_for=(Exception,),
retry_backoff=2,
max_retries=5,
queue="phone_call_queue",
)
def make_phone_call(campaign_id: str, contact_id: str):
res = requests.post(
Expand Down
7 changes: 6 additions & 1 deletion apps/worker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ command=celery -A main worker --loglevel=info
startsecs=0
autorestart=false

[program:phone_call_worker]
command=celery -A main worker --loglevel=info --concurrency=1 --queues=phone_call_queue
startsecs=0
autorestart=false

[program:beat]
command=celery -A main beat --loglevel=info
startsecs=0
Expand All @@ -14,4 +19,4 @@ autorestart=false
[program:flower]
command=celery -A main flower --port=80
startsecs=0
autorestart=false
autorestart=false

0 comments on commit 12ed3fa

Please sign in to comment.