mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2025-07-02 23:31:10 +00:00
fix empty is_pending
This commit is contained in:
parent
259008df50
commit
58530563ce
@ -34,6 +34,9 @@ class TaskManager:
|
||||
def is_pending(self, task):
|
||||
"""check if task_name is pending, pass task object"""
|
||||
tasks = self.get_tasks_by_name(task.name)
|
||||
if not tasks:
|
||||
return False
|
||||
|
||||
return bool([i for i in tasks if i.get("status") == "PENDING"])
|
||||
|
||||
def get_pending(self, task_name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user