mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
nagios: Clean up after ourselves.
This prevents building up a large number of messages in the database.
This commit is contained in:
committed by
Tim Abbott
parent
1f045bc794
commit
97afd713e0
@@ -128,13 +128,15 @@ send_zulip(
|
||||
},
|
||||
)
|
||||
|
||||
msg_content: list[str] = []
|
||||
|
||||
while msg_to_send not in msg_content:
|
||||
complete = False
|
||||
while not complete:
|
||||
messages = get_zulips()
|
||||
seconds_diff = time.perf_counter() - time_start
|
||||
|
||||
msg_content = [m["content"] for m in messages]
|
||||
for m in messages:
|
||||
if msg_to_send == m["content"]:
|
||||
zulip_sender.delete_message(m["id"])
|
||||
complete = True
|
||||
break
|
||||
|
||||
zulip_recipient.deregister(queue_id)
|
||||
|
||||
|
Reference in New Issue
Block a user