<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">&lt;<a href="mailto:rbean@redhat.com" target="_blank">rbean@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;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&#39;s been<br>
spouting messages all day long about it.  It&#39;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&#39;ll resume<br>
notifying people about deleted builds after this is done with.<br>
<br>
Note that, we&#39;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(&quot;Dropping %r&quot;, topic)<br>
                 return<br>
<br>
+        if topic.endswith(&#39;buildsys.build.state.change&#39;):<br>
+            # This is the internal koji code for a &quot;deleted&quot; build<br>
+            # See an example here:  <a href="http://da.gd/41KV" target="_blank">http://da.gd/41KV</a><br>
+            if msg[&#39;msg&#39;][&#39;new&#39;] == 2:<br>
+                log.debug(&#39;Dropping deleted build message.&#39;)<br>
+                return<br>
+<br>
         start = time.time()<br>
         log.debug(&quot;FMNConsumer received %s %s&quot;, msg[&#39;msg_id&#39;], msg[&#39;topic&#39;])<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>