summaryrefslogtreecommitdiff
path: root/src/buildstream/_pipeline.py
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-07-02 17:14:44 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-05 09:44:45 +0000
commitcfbab5fe76f8011bc8b6b895b2d3bfff4ea167b3 (patch)
tree51abb49a04c9797e7def9c8929e8f427037c61ed /src/buildstream/_pipeline.py
parentb60fffebf563edfe258cbb893754197af1ac5a0b (diff)
downloadbuildstream-cfbab5fe76f8011bc8b6b895b2d3bfff4ea167b3.tar.gz
Refactor, use context.messenger directly
Instead of having methods in Context forward calls on to the Messenger, have folks call the Messenger directly. Remove the forwarding methods in Context.
Diffstat (limited to 'src/buildstream/_pipeline.py')
-rw-r--r--src/buildstream/_pipeline.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/_pipeline.py b/src/buildstream/_pipeline.py
index 0758cf5ff..4352df56c 100644
--- a/src/buildstream/_pipeline.py
+++ b/src/buildstream/_pipeline.py
@@ -123,7 +123,7 @@ class Pipeline():
# targets (list of Element): The list of toplevel element targets
#
def resolve_elements(self, targets):
- with self._context.timed_activity("Resolving cached state", silent_nested=True):
+ with self._context.messenger.timed_activity("Resolving cached state", silent_nested=True):
for element in self.dependencies(targets, Scope.ALL):
# Preflight
@@ -355,7 +355,7 @@ class Pipeline():
def assert_consistent(self, elements):
inconsistent = []
inconsistent_workspaced = []
- with self._context.timed_activity("Checking sources"):
+ with self._context.messenger.timed_activity("Checking sources"):
for element in elements:
if element._get_consistency() == Consistency.INCONSISTENT:
if element._get_workspace():
@@ -391,7 +391,7 @@ class Pipeline():
#
def assert_sources_cached(self, elements):
uncached = []
- with self._context.timed_activity("Checking sources"):
+ with self._context.messenger.timed_activity("Checking sources"):
for element in elements:
if element._get_consistency() < Consistency.CACHED and \
not element._source_cached():
@@ -466,7 +466,7 @@ class Pipeline():
#
def _message(self, message_type, message, **kwargs):
args = dict(kwargs)
- self._context.message(
+ self._context.messenger.message(
Message(None, message_type, message, **args))