mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Move job processing into celery
- brings boto S3 into new AWS folder - CSV processing utils method Rejigs the jobs rest endpoint - removes some now unused endpoints, Calls to the task with the job, job processing in task, delegating SMS calls to the sms task
This commit is contained in:
12
app/csv.py
Normal file
12
app/csv.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import csv
|
||||
|
||||
|
||||
def get_mobile_numbers_from_csv(file_data):
|
||||
numbers = []
|
||||
reader = csv.DictReader(
|
||||
file_data.splitlines(),
|
||||
lineterminator='\n',
|
||||
quoting=csv.QUOTE_NONE)
|
||||
for i, row in enumerate(reader):
|
||||
numbers.append(row['phone'].replace(' ', ''))
|
||||
return numbers
|
||||
Reference in New Issue
Block a user