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:
Martyn Inglis
2016-02-24 17:12:30 +00:00
parent 1667f82df1
commit b3884e2d6c
20 changed files with 453 additions and 527 deletions

View File

@@ -1,3 +1,4 @@
import uuid
import os
import re
from flask import request, url_for
@@ -50,7 +51,7 @@ def create_app():
application.register_blueprint(user_blueprint, url_prefix='/user')
application.register_blueprint(template_blueprint)
application.register_blueprint(status_blueprint, url_prefix='/status')
application.register_blueprint(notifications_blueprint, url_prefix='/notifications')
application.register_blueprint(notifications_blueprint)
application.register_blueprint(job_blueprint)
return application
@@ -99,3 +100,7 @@ def email_safe(string):
character.lower() if character.isalnum() or character == "." else ""
for character in re.sub("\s+", ".", string.strip())
])
def create_uuid():
return str(uuid.uuid4())