mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 01:02:09 -05:00
Use sender_id from CSV metadata.
When we upload a CSV for a job, we add the sender_id as metadata to the file that is uploaded on S3. There is more than one place where we process rows from that CSV. - process_job - scheduled_job - check_for_missing_rows_in_completed_jobs - check_job_status All of these places need to use the sender_id, now the sender_id is always read from the file metadata. In a subsequent PR we can remove the optional sender_id parameter from process_job task.
This commit is contained in:
@@ -242,6 +242,6 @@ def check_for_missing_rows_in_completed_jobs():
|
||||
recipient_csv, template, sender_id = get_recipient_csv_and_template_and_sender_id(job)
|
||||
for row in recipient_csv.get_rows():
|
||||
if row.index == row_to_process.missing_row:
|
||||
current_app.logger(
|
||||
current_app.logger.info(
|
||||
"Processing missing row: {} for job: {}".format(row_to_process.missing_row, job.id))
|
||||
process_row(row, template, job, job.service, sender_id=sender_id)
|
||||
|
||||
Reference in New Issue
Block a user