mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-21 23:06:10 -04:00
Compare commits
1 Commits
fips
...
callbacks-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f793bb0922 |
@@ -60,6 +60,7 @@ performance_platform_client = PerformancePlatformClient()
|
|||||||
cbc_proxy_client = CBCProxyClient()
|
cbc_proxy_client = CBCProxyClient()
|
||||||
document_download_client = DocumentDownloadClient()
|
document_download_client = DocumentDownloadClient()
|
||||||
metrics = GDSMetrics()
|
metrics = GDSMetrics()
|
||||||
|
counter = 0
|
||||||
|
|
||||||
notification_provider_clients = NotificationProviderClients()
|
notification_provider_clients = NotificationProviderClients()
|
||||||
|
|
||||||
|
|||||||
19
app/celery/canary_tasks.py
Normal file
19
app/celery/canary_tasks.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
from flask import current_app
|
||||||
|
from notifications_utils.statsd_decorators import statsd
|
||||||
|
|
||||||
|
from app import counter, notify_celery
|
||||||
|
|
||||||
|
|
||||||
|
@statsd(namespace="tasks")
|
||||||
|
def canary_passing_task():
|
||||||
|
global counter
|
||||||
|
counter += 1
|
||||||
|
|
||||||
|
current_app.logger.info(f'The counter is {counter}.')
|
||||||
|
|
||||||
|
|
||||||
|
@notify_celery.task(name="canary_failing_task", max_retries=60, default_retry_delay=30)
|
||||||
|
@statsd(namespace="tasks")
|
||||||
|
def canary_failing_task():
|
||||||
|
current_app.logger.info('Calling the failing task')
|
||||||
|
raise Exception
|
||||||
@@ -68,6 +68,7 @@
|
|||||||
'notify-delivery-worker-receipts': {},
|
'notify-delivery-worker-receipts': {},
|
||||||
'notify-delivery-worker-service-callbacks': {'disk_quota': '2G'},
|
'notify-delivery-worker-service-callbacks': {'disk_quota': '2G'},
|
||||||
'notify-delivery-worker-save-api-notifications': {'disk_quota': '2G'},
|
'notify-delivery-worker-save-api-notifications': {'disk_quota': '2G'},
|
||||||
|
'notify-delivery-worker-canary': {'disk_quota': '2G'},
|
||||||
} -%}
|
} -%}
|
||||||
|
|
||||||
{%- set app = app_vars[CF_APP] -%}
|
{%- set app = app_vars[CF_APP] -%}
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ case $NOTIFY_APP_NAME in
|
|||||||
exec scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 \
|
exec scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 \
|
||||||
-Q save-api-email-tasks,save-api-sms-tasks 2> /dev/null
|
-Q save-api-email-tasks,save-api-sms-tasks 2> /dev/null
|
||||||
;;
|
;;
|
||||||
|
delivery-worker-canary)
|
||||||
|
exec scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 \
|
||||||
|
-Q canary-a,canary-b 2> /dev/null
|
||||||
|
;;
|
||||||
delivery-celery-beat)
|
delivery-celery-beat)
|
||||||
exec scripts/run_app_paas.sh celery -A run_celery.notify_celery beat --loglevel=INFO
|
exec scripts/run_app_paas.sh celery -A run_celery.notify_celery beat --loglevel=INFO
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user