Cleanups
This commit is contained in:
@@ -110,5 +110,6 @@ class Manager:
|
||||
self, game: Game, additional_data: dict, callback: Callable[["Manager"], Any]
|
||||
) -> None:
|
||||
"""Pass the game through the manager"""
|
||||
# TODO: connect to signals here
|
||||
self.execute_resilient_manager_logic(game, additional_data)
|
||||
callback(self)
|
||||
|
||||
@@ -40,12 +40,12 @@ class Pipeline(GObject.Object):
|
||||
def blocked(self) -> set[Manager]:
|
||||
"""Get the managers that cannot run because their dependencies aren't done"""
|
||||
blocked = set()
|
||||
for manager_a in self.waiting:
|
||||
for manager_b in self.not_done:
|
||||
if manager_a == manager_b:
|
||||
for waiting in self.waiting:
|
||||
for not_done in self.not_done:
|
||||
if waiting == not_done:
|
||||
continue
|
||||
if type(manager_b) in manager_a.run_after:
|
||||
blocked.add(manager_a)
|
||||
if type(not_done) in waiting.run_after:
|
||||
blocked.add(waiting)
|
||||
return blocked
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user