MCPcopy Create free account
hub / github.com/celery/celery / _finalize_steps

Method _finalize_steps

celery/bootsteps.py:235–249  ·  view source on GitHub ↗
(self, steps)

Source from the content-addressed store, hash-verified

233 stream.append(node.requires)
234
235 def _finalize_steps(self, steps):
236 last = self._find_last()
237 self._firstpass(steps)
238 it = ((C, C.requires) for C in steps.values())
239 G = self.graph = DependencyGraph(
240 it, formatter=self.GraphFormatter(root=last),
241 )
242 if last:
243 for obj in G:
244 if obj != last:
245 G.add_edge(last, obj)
246 try:
247 return G.topsort()
248 except KeyError as exc:
249 raise KeyError('unknown bootstep: %s' % exc)
250
251 def claim_steps(self):
252 return dict(self.load_step(step) for step in self.types)

Callers 2

applyMethod · 0.95

Calls 5

_find_lastMethod · 0.95
_firstpassMethod · 0.95
DependencyGraphClass · 0.85
add_edgeMethod · 0.80
topsortMethod · 0.80

Tested by 1