From 0a314bb84a7615113f73786aa1f83eb294fb0be6 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Fri, 7 Sep 2018 16:47:01 +0100 Subject: element.py: Remove redundant timed_activity This removes the timed_activity for an element _push action. This is unnecessary as the job is already being timed elsewhere. --- buildstream/element.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/buildstream/element.py b/buildstream/element.py index 6b0a728e6..1fefd6562 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1712,16 +1712,15 @@ class Element(Plugin): self.warn("Not pushing tainted artifact.") return False - display_key = self._get_brief_display_key() - with self.timed_activity("Pushing artifact {}".format(display_key)): - # Push all keys used for local commit - pushed = self.__artifacts.push(self, self.__get_cache_keys_for_commit()) - if not pushed: - return False + # Push all keys used for local commit + pushed = self.__artifacts.push(self, self.__get_cache_keys_for_commit()) + if not pushed: + return False - # Notify successful upload - self.info("Pushed artifact {}".format(display_key)) - return True + # Notify successful upload + display_key = self._get_brief_display_key() + self.info("Pushed artifact {}".format(display_key)) + return True # _shell(): # -- cgit v1.2.1