database: listen to rida.component.state.change (failover)

This commit is contained in:
Lubos Kocman
2016-07-18 22:29:59 +02:00
parent c0408b148b
commit bd28b7852a

View File

@@ -241,7 +241,7 @@ class ComponentBuild(Base):
@classmethod
def from_fedmsg(cls, session, msg):
if '.buildsys.build.state.change' not in msg['topic']:
if 'component.state.change' not in msg['topic'] and '.buildsys.build.state.change' not in msg['topic']:
raise ValueError("%r is not a koji message." % msg['topic'])
return session.query(cls).filter(cls.task_id==msg['msg']['task_id']).first()