Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Unified Diff: dashboard/dashboard/pinpoint/models/quest/find_isolate.py

Issue 3017633002: [pinpoint] Move _previous_builds from the Execution class to the Quest instance. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/pinpoint/models/quest/find_isolate.py
diff --git a/dashboard/dashboard/pinpoint/models/quest/find_isolate.py b/dashboard/dashboard/pinpoint/models/quest/find_isolate.py
index 295a0d7ef8dc725e54f7f58a79a4f44354ddb31c..9646d0f152c24d20eee6e4bfe0d7bc670303f5ed 100644
--- a/dashboard/dashboard/pinpoint/models/quest/find_isolate.py
+++ b/dashboard/dashboard/pinpoint/models/quest/find_isolate.py
@@ -21,6 +21,8 @@ class FindIsolate(quest.Quest):
self._builder_name = _BuilderNameForConfiguration(configuration)
self._target = target
+ self._previous_builds = {}
+
def __eq__(self, other):
return (isinstance(other, type(self)) and
self._builder_name == other._builder_name)
@@ -29,18 +31,20 @@ class FindIsolate(quest.Quest):
return 'Build'
def Start(self, change):
- return _FindIsolateExecution(self._builder_name, self._target, change)
+ return _FindIsolateExecution(self._builder_name, self._target, change,
+ self._previous_builds)
class _FindIsolateExecution(execution.Execution):
- _previous_builds = {}
-
- def __init__(self, builder_name, target, change):
+ def __init__(self, builder_name, target, change, previous_builds):
super(_FindIsolateExecution, self).__init__()
self._builder_name = builder_name
self._target = target
self._change = change
+ # previous_builds is shared among all Executions of the same Quest.
+ self._previous_builds = previous_builds
+
self._build = None
def _AsDict(self):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698