From 8bdf1e4a1057d1ad6b9b36370baba5e520c46939 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 8 May 2024 18:13:36 +0000 Subject: [PATCH] check_send_receive_time: Move "states" to inside where they are used. --- .../zulip_app_frontend/check_send_receive_time | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time index 54893513df..d47344e5a5 100755 --- a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time +++ b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time @@ -45,15 +45,15 @@ parser.add_argument("--insecure", action="store_true") options = parser.parse_args() -states = { - "OK": 0, - "WARNING": 1, - "CRITICAL": 2, - "UNKNOWN": 3, -} - def report(state: str, timestamp: Any = None, msg: Optional[str] = None) -> NoReturn: + states = { + "OK": 0, + "WARNING": 1, + "CRITICAL": 2, + "UNKNOWN": 3, + } + now = int(time.time()) if msg is None: msg = f"send time was {timestamp}"