Merge pull request #647 from alphagov/move-csv-emails-into-same-queue-as-api

Pushed the notifications from the CSV in the DB queue
This commit is contained in:
minglis
2016-08-31 10:41:27 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ def process_job(job_id):
create_uuid(),
encrypted,
datetime.utcnow().strftime(DATETIME_FORMAT)),
queue='bulk-sms'
queue='db-sms'
)
if template.template_type == EMAIL_TYPE:
@@ -93,7 +93,7 @@ def process_job(job_id):
create_uuid(),
encrypted,
datetime.utcnow().strftime(DATETIME_FORMAT)),
queue='bulk-email')
queue='db-email')
finished = datetime.utcnow()
job.status = 'finished'

View File

@@ -82,7 +82,7 @@ def test_should_process_sms_job(sample_job, mocker, mock_celery_remove_job):
"uuid",
"something_encrypted",
"2016-01-01T11:09:00.061258"),
queue="bulk-sms"
queue="db-sms"
)
job = jobs_dao.dao_get_job_by_id(sample_job.id)
assert job.status == 'finished'
@@ -201,7 +201,7 @@ def test_should_process_email_job_if_exactly_on_send_limits(notify_db,
"something_encrypted",
"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")
@@ -245,7 +245,7 @@ def test_should_process_email_job(sample_email_job, mocker, mock_celery_remove_j
"something_encrypted",
"2016-01-01T11:09:00.061258"
),
queue="bulk-email"
queue="db-email"
)
job = jobs_dao.dao_get_job_by_id(sample_email_job.id)
assert job.status == 'finished'