mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-18 06:11:49 -05:00
Updated logging in run-celery script to log to application logs
- poll every second - visibility of 1 minute
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from app import notify_celery, twilio_client, db, encryption
|
from app import notify_celery, twilio_client, encryption
|
||||||
from app.clients.sms.twilio import TwilioClientException
|
from app.clients.sms.twilio import TwilioClientException
|
||||||
from app.dao.templates_dao import get_model_templates
|
from app.dao.templates_dao import get_model_templates
|
||||||
from app.dao.notifications_dao import save_notification
|
from app.dao.notifications_dao import save_notification
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ class Config(object):
|
|||||||
BROKER_URL = 'sqs://'
|
BROKER_URL = 'sqs://'
|
||||||
BROKER_TRANSPORT_OPTIONS = {
|
BROKER_TRANSPORT_OPTIONS = {
|
||||||
'region': 'eu-west-1',
|
'region': 'eu-west-1',
|
||||||
'polling_interval': 10, # 1 second
|
'polling_interval': 1, # 1 second
|
||||||
'visibility_timeout': 3600, # 1 hour
|
'visibility_timeout': 60, # 60 seconds
|
||||||
'queue_name_prefix': 'preview'
|
'queue_name_prefix': os.environ['NOTIFICATION_QUEUE_PREFIX']
|
||||||
}
|
}
|
||||||
CELERY_ENABLE_UTC = True,
|
CELERY_ENABLE_UTC = True,
|
||||||
CELERY_TIMEZONE = 'Europe/London'
|
CELERY_TIMEZONE = 'Europe/London'
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
source environment.sh
|
source environment.sh
|
||||||
celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=1 --autoreload -Q sms
|
celery -A run_celery.notify_celery worker --loglevel=INFO --logfile=/var/log/notify/application.log --concurrency=4 -Q sms
|
||||||
Reference in New Issue
Block a user