mirror of https://github.com/zulip/zulip.git
nagios: Clean up after ourselves.
This prevents building up a large number of messages in the database.
This commit is contained in:
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue