[PATCH] add id and parent to the headers of Koji TaskStateChange messages
Mike Bonnet
mikeb at redhat.com
Mon Apr 20 22:38:12 UTC 2015
This should make it easier to track the state of a specific task and any
child tasks it creates. While this may be considered a change to the
public API, it is an additive change and I can't imagine any current
use-cases it would affect.
Questions/comments welcome.
Thanks,
Mike
-------------- next part --------------
From fba2916b99e4f29a6e674e30f9ff05ca00744cfd Mon Sep 17 00:00:00 2001
From: Mike Bonnet <mikeb at redhat.com>
Date: Mon, 20 Apr 2015 18:33:45 -0400
Subject: [PATCH] add id and parent to the headers of TaskStateChange messages
---
plugins/messagebus.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugins/messagebus.py b/plugins/messagebus.py
index a23bc94..2b23fe5 100644
--- a/plugins/messagebus.py
+++ b/plugins/messagebus.py
@@ -168,6 +168,8 @@ def get_message_headers(msgtype, *args, **kws):
headers['tag'] = kws['tag']['name']
headers['package'] = kws['package']['name']
elif msgtype == 'TaskStateChange':
+ headers['id'] = kws['info']['id']
+ headers['parent'] = kws['info']['parent']
headers['method'] = kws['info']['method']
headers['attribute'] = kws['attribute']
headers['old'] = kws['old']
--
1.8.2.1
More information about the buildsys
mailing list