mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Pushed the notifications from the CSV in the DB queue
This commit is contained in:
@@ -84,7 +84,7 @@ def process_job(job_id):
|
|||||||
create_uuid(),
|
create_uuid(),
|
||||||
encrypted,
|
encrypted,
|
||||||
datetime.utcnow().strftime(DATETIME_FORMAT)),
|
datetime.utcnow().strftime(DATETIME_FORMAT)),
|
||||||
queue='bulk-sms'
|
queue='db-sms'
|
||||||
)
|
)
|
||||||
|
|
||||||
if template.template_type == EMAIL_TYPE:
|
if template.template_type == EMAIL_TYPE:
|
||||||
@@ -93,7 +93,7 @@ def process_job(job_id):
|
|||||||
create_uuid(),
|
create_uuid(),
|
||||||
encrypted,
|
encrypted,
|
||||||
datetime.utcnow().strftime(DATETIME_FORMAT)),
|
datetime.utcnow().strftime(DATETIME_FORMAT)),
|
||||||
queue='bulk-email')
|
queue='db-email')
|
||||||
|
|
||||||
finished = datetime.utcnow()
|
finished = datetime.utcnow()
|
||||||
job.status = 'finished'
|
job.status = 'finished'
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ def test_should_process_sms_job(sample_job, mocker, mock_celery_remove_job):
|
|||||||
"uuid",
|
"uuid",
|
||||||
"something_encrypted",
|
"something_encrypted",
|
||||||
"2016-01-01T11:09:00.061258"),
|
"2016-01-01T11:09:00.061258"),
|
||||||
queue="bulk-sms"
|
queue="db-sms"
|
||||||
)
|
)
|
||||||
job = jobs_dao.dao_get_job_by_id(sample_job.id)
|
job = jobs_dao.dao_get_job_by_id(sample_job.id)
|
||||||
assert job.status == 'finished'
|
assert job.status == 'finished'
|
||||||
@@ -201,7 +201,7 @@ def test_should_process_email_job_if_exactly_on_send_limits(notify_db,
|
|||||||
"something_encrypted",
|
"something_encrypted",
|
||||||
"2016-01-01T11:09:00.061258"
|
"2016-01-01T11:09:00.061258"
|
||||||
),
|
),
|
||||||
queue="bulk-email"
|
queue="db-email"
|
||||||
)
|
)
|
||||||
mock_celery_remove_job.assert_called_once_with((str(job.id),), queue="remove-job")
|
mock_celery_remove_job.assert_called_once_with((str(job.id),), queue="remove-job")
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ def test_should_process_email_job(sample_email_job, mocker, mock_celery_remove_j
|
|||||||
"something_encrypted",
|
"something_encrypted",
|
||||||
"2016-01-01T11:09:00.061258"
|
"2016-01-01T11:09:00.061258"
|
||||||
),
|
),
|
||||||
queue="bulk-email"
|
queue="db-email"
|
||||||
)
|
)
|
||||||
job = jobs_dao.dao_get_job_by_id(sample_email_job.id)
|
job = jobs_dao.dao_get_job_by_id(sample_email_job.id)
|
||||||
assert job.status == 'finished'
|
assert job.status == 'finished'
|
||||||
|
|||||||
Reference in New Issue
Block a user