From 276644f504bb8d86a1cb9d0028cffa288049f17c Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 12 Feb 2021 15:49:16 +0000 Subject: [PATCH] Reduce default broadcast expiry time to 4 hours MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don’t think we need to broadcast longer than this to validate that the system is working. --- app/models/broadcast_message.py | 2 +- tests/app/main/views/test_broadcast.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/broadcast_message.py b/app/models/broadcast_message.py index a6a0185f0..763fc1e3c 100644 --- a/app/models/broadcast_message.py +++ b/app/models/broadcast_message.py @@ -220,7 +220,7 @@ class BroadcastMessage(JSONModel): self._update( starts_at=datetime.utcnow().isoformat(), finishes_at=( - datetime.utcnow() + timedelta(hours=23, minutes=59) + datetime.utcnow() + timedelta(hours=4, minutes=0) ).isoformat(), ) self._set_status_to('broadcasting') diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index d7de9767b..6c32dca68 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -1873,7 +1873,7 @@ def test_request_approval( broadcast_message_id=fake_uuid, data={ 'starts_at': '2020-02-22T22:22:22', - 'finishes_at': '2020-02-23T22:21:22', + 'finishes_at': '2020-02-23T02:22:22', }, ) mock_update_broadcast_message_status.assert_called_once_with(