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] = []
|
complete = False
|
||||||
|
while not complete:
|
||||||
while msg_to_send not in msg_content:
|
|
||||||
messages = get_zulips()
|
messages = get_zulips()
|
||||||
seconds_diff = time.perf_counter() - time_start
|
seconds_diff = time.perf_counter() - time_start
|
||||||
|
for m in messages:
|
||||||
msg_content = [m["content"] for m in messages]
|
if msg_to_send == m["content"]:
|
||||||
|
zulip_sender.delete_message(m["id"])
|
||||||
|
complete = True
|
||||||
|
break
|
||||||
|
|
||||||
zulip_recipient.deregister(queue_id)
|
zulip_recipient.deregister(queue_id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue