vdq.tasks
Overview
Celery tasks for sending queue items and processing SMS status updates.
Classes
check_previously_received_message_sid
Apply a Twilio webhook status to the SMS queue item with message_sid. The webhook view queues this when no matching queue item exists yet.
Signature
check_previously_received_message_sid(message_sid, message_status)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| message_sid | yes | |||
| message_status | yes |
Source
server/vueda/vdq/tasks.py:200
check_sms_status
Poll Twilio for the status of SMS queue items awaiting delivery and update them. Celery runs this every 30 seconds when no Twilio webhook is configured.
Signature
check_sms_status()
Source
server/vueda/vdq/tasks.py:125
check_sms_timeout_only
Fetch the Twilio status of awaiting SMS queue items past the timeout window, and time out those without a final status. Celery runs this every 30 seconds when a Twilio webhook is configured.
Signature
check_sms_timeout_only()
Source
server/vueda/vdq/tasks.py:142
send_message
Send the queue item qi_pk by SMS or email, depending on method. Retries the task when the queue item stays locked, retries transient Anymail errors with backoff, and moves the item to errored on failure.
Signature
send_message(qi_pk, method)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| qi_pk | yes | |||
| method | yes |
Source
server/vueda/vdq/tasks.py:151
Source
server/vueda/vdq/tasks.py