<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 6 March 2015 at 16:31, Ralph Bean <span dir="ltr"><<a href="mailto:rbean@redhat.com" target="_blank">rbean@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'd like to apply this hotfix to the notifications backend to have it<br>
drop all the messages in its queue about builds being deleted from<br>
koji.<br></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Koji garbage collection just started working again, and it's been<br>
spouting messages all day long about it. It's about halfway through<br>
the alphabet and we now have a multiple-hour-long backlog in the FMN<br>
queue: <a href="http://threebean.org/fedmsg-health-day.html#FMN" target="_blank">http://threebean.org/fedmsg-health-day.html#FMN</a><br>
<br>
This will only be temporary until this wave is over. We'll resume<br>
notifying people about deleted builds after this is done with.<br>
<br>
Note that, we'll still have a record about what builds were deleted in<br>
the datagrepper history. This will only squash the developer<br>
notifications.<br>
<br></blockquote><div><br></div><div>OK sounds good +1</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can I get two +1s to apply this change?<br>
<br>
<br>
diff --git a/fmn/consumer/consumer.py b/fmn/consumer/consumer.py<br>
index 9840b93..99f4239 100644<br>
--- a/fmn/consumer/consumer.py<br>
+++ b/fmn/consumer/consumer.py<br>
@@ -101,6 +101,13 @@ class FMNConsumer(fedmsg.consumers.FedmsgConsumer):<br>
log.debug("Dropping %r", topic)<br>
return<br>
<br>
+ if topic.endswith('buildsys.build.state.change'):<br>
+ # This is the internal koji code for a "deleted" build<br>
+ # See an example here: <a href="http://da.gd/41KV" target="_blank">http://da.gd/41KV</a><br>
+ if msg['msg']['new'] == 2:<br>
+ log.debug('Dropping deleted build message.')<br>
+ return<br>
+<br>
start = time.time()<br>
log.debug("FMNConsumer received %s %s", msg['msg_id'], msg['topic'])<br>
<br>
<br>_______________________________________________<br>
infrastructure mailing list<br>
<a href="mailto:infrastructure@lists.fedoraproject.org">infrastructure@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/infrastructure" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/infrastructure</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Stephen J Smoogen.<br><br></div></div>
</div></div>