Skip to content

Commit

Permalink
Merge pull request #3077 from ttys0dev/celery-send-alert-and-webhook
Browse files Browse the repository at this point in the history
Move send_alert_and_webhook to background celery task
  • Loading branch information
mlissner authored Sep 7, 2023
2 parents e58acbf + 5487221 commit 951308b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cl/recap/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ async def process_recap_docket(pk):
if content_updated:
newly_enqueued = enqueue_docket_alert(d.pk)
if newly_enqueued:
await sync_to_async(send_alert_and_webhook)(d.pk, start_time)
await sync_to_async(send_alert_and_webhook.delay)(d.pk, start_time)
await mark_pq_successful(pq, d_id=d.pk)
return {
"docket_pk": d.pk,
Expand Down Expand Up @@ -851,7 +851,7 @@ async def process_recap_docket_history_report(pk):
if content_updated:
newly_enqueued = enqueue_docket_alert(d.pk)
if newly_enqueued:
await sync_to_async(send_alert_and_webhook)(d.pk, start_time)
await sync_to_async(send_alert_and_webhook.delay)(d.pk, start_time)
await mark_pq_successful(pq, d_id=d.pk)
return {
"docket_pk": d.pk,
Expand Down Expand Up @@ -1057,7 +1057,7 @@ async def process_recap_appellate_docket(pk):
if content_updated:
newly_enqueued = enqueue_docket_alert(d.pk)
if newly_enqueued:
await sync_to_async(send_alert_and_webhook)(d.pk, start_time)
await sync_to_async(send_alert_and_webhook.delay)(d.pk, start_time)
await mark_pq_successful(pq, d_id=d.pk)
return {
"docket_pk": d.pk,
Expand Down

0 comments on commit 951308b

Please sign in to comment.