Skip to content

Commit

Permalink
Remove a redundant queue method.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Dec 10, 2024
1 parent 374fe0b commit 3bd6040
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@ def _force_trigger(self, itask: 'TaskProxy', on_resume: bool = False):
itask.state_reset(is_queued=True)
self.data_store_mgr.delta_task_state(itask)

elif self.task_queue_mgr.force_release_task(itask):
elif self.task_queue_mgr.remove_task(itask):
# else release it from the queue to run now
itask.state_reset(is_queued=False)
self.data_store_mgr.delta_task_state(itask)
Expand Down
8 changes: 0 additions & 8 deletions cylc/flow/task_queues/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ def remove_task(self, itask: 'TaskProxy') -> bool:
"""Try to remove a task from the queues. Return True if done."""
raise NotImplementedError

@abstractmethod
def force_release_task(self, itask: 'TaskProxy') -> bool:
"""Remove a task from whichever queue it belongs to.
Return True if released, else False
"""
raise NotImplementedError

@abstractmethod
def adopt_tasks(self, orphans: List[str]) -> None:
"""Adopt tasks with defs removed by scheduler reload or restart."""
Expand Down
7 changes: 0 additions & 7 deletions cylc/flow/task_queues/independent.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ def remove_task(self, itask: 'TaskProxy') -> bool:
"""Try to remove a task from the queues. Return True if done."""
return any(queue.remove(itask) for queue in self.queues.values())

def force_release_task(self, itask: 'TaskProxy') -> bool:
"""Remove a task from whichever queue it belongs to.
Return True if released, else False.
"""
return self.remove_task(itask)

def adopt_tasks(self, orphans: List[str]) -> None:
"""Adopt orphaned tasks to the default group."""
self.queues[self.Q_DEFAULT].adopt(orphans)
Expand Down

0 comments on commit 3bd6040

Please sign in to comment.