From ae08f92b748f1025b5791ebbb1ebaea5a7f7d0b8 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 24 May 2017 18:14:02 +0900 Subject: _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) --- buildstream/_message.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'buildstream/_message.py') 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): -- cgit v1.2.1