mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-10 18:23:01 -04:00
Since the expiry is sent as part of the message payload, we don't need to invoke the CBC proxies (and indeed there's no way to do so for an expired alert). In future we plan to extend this task so it triggers the regeneration of content on gov.uk/alerts. It's worth noting that 'finishes_at' can theoretically be None, in which case it's unclear when the alert should expire. While alerts from the Admin app should always have an expiry [1], we have many in the DB that don't, so it's worth checking for this scenario. [1]: https://github.com/alphagov/notifications-admin/blob/078ac10c8df855a84c157190d43daa9a8897832b/app/models/broadcast_message.py#L255