summaryrefslogtreecommitdiff
path: root/buildstream/_message.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-05-24 18:14:02 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-05-24 18:14:02 +0900
commitae08f92b748f1025b5791ebbb1ebaea5a7f7d0b8 (patch)
tree4d56bd9d8eb1ad0bf40af92ae46ccb7a9dfa5eac /buildstream/_message.py
parentca9a8837dd00a283fd8a9cca1760588640d23571 (diff)
downloadbuildstream-ae08f92b748f1025b5791ebbb1ebaea5a7f7d0b8.tar.gz
_message.py: Added task_id parameter
To differentiate between the element and the task, some messages come from an element that is not the primary element of the task (i.e. when running integration commands on behalf of another element)
Diffstat (limited to 'buildstream/_message.py')
-rw-r--r--buildstream/_message.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/_message.py b/buildstream/_message.py
index 811dd0160..6119d84a3 100644
--- a/buildstream/_message.py
+++ b/buildstream/_message.py
@@ -54,6 +54,7 @@ unconditional_messages = [
class Message():
def __init__(self, unique_id, message_type, message,
+ task_id=None,
detail=None,
action_name=None,
elapsed=None,
@@ -70,7 +71,8 @@ class Message():
self.logfile = logfile # The log file path where commands took place
self.sandbox = sandbox # The sandbox directory where an error occurred (if any)
self.pid = os.getpid() # The process pid
- self.unique_id = unique_id # The plugin object unique identifier
+ self.unique_id = unique_id # The plugin object ID issueing the message
+ self.task_id = task_id # The plugin object ID of the task
self.scheduler = scheduler # Whether this is a scheduler level message
if message_type in (MessageType.SUCCESS, MessageType.FAIL):