Add process_mmg_responses

Refactor process_firetext_responses
Removed the abstract ClientResponses for firetext and mmg. There is a map for each response to handle the status codes sent by each client.
Since MMG has about 20 different status code, none of which seem to be a pending state (unlike firetext that has 3 status one for pending - network delay).
For MMG status codes, look for 00 as successful, everything else is assumed to be a failure.
This commit is contained in:
Rebecca Law
2016-04-06 14:31:33 +01:00
parent f2ee8f3eb7
commit 4806123d5c
11 changed files with 343 additions and 191 deletions

View File

@@ -80,7 +80,8 @@ def init_app(app):
no_auth_req = [
url_for('status.show_status'),
url_for('notifications.process_ses_response'),
url_for('notifications.process_firetext_response')
url_for('notifications.process_firetext_response'),
url_for('notifications.process_mmg_response')
]
if request.path not in no_auth_req:
from app.authentication import auth