update broadcast provider message status on success/error

so we can distinguish errorring messages that are currently retrying
from those that sent succesfully.
This commit is contained in:
Leo Hemsted
2021-02-01 16:37:22 +00:00
parent 3dcbfc3612
commit 96a0935d1c
3 changed files with 41 additions and 13 deletions

View File

@@ -61,3 +61,8 @@ def create_broadcast_provider_message(broadcast_event, provider):
db.session.add(provider_message_number)
db.session.commit()
return provider_message
@transactional
def update_broadcast_provider_message_status(broadcast_provider_message, status):
broadcast_provider_message.status = status