mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
send broadcast events rather than messages
use the new endpoint from cbc proxy. create a new task that just serializes the event and sends it across rather than sending a template and the broadcast message. some changes to serialize to make it json friendly etc. it also expects sent_at and transmitted_finishes_at to always be set (we set them in the code but don't enforce it n the DB right now), as they're required by utils template. not sure whether we'll update db constraints to be more strict or utils template to be more permissive just yet, wait until we find out more about the requirements of the CBCs we integrate with.
This commit is contained in:
@@ -1043,7 +1043,7 @@ def create_broadcast_event(
|
||||
transmitted_areas=transmitted_areas or ['london'],
|
||||
transmitted_sender=transmitted_sender or 'www.notifications.service.gov.uk',
|
||||
transmitted_starts_at=transmitted_starts_at,
|
||||
transmitted_finishes_at=transmitted_finishes_at,
|
||||
transmitted_finishes_at=transmitted_finishes_at or datetime.utcnow(),
|
||||
)
|
||||
db.session.add(b_e)
|
||||
db.session.commit()
|
||||
|
||||
Reference in New Issue
Block a user