mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Update dvc/repo/experiments/queue/base.py dvc/repo/experiments/queue/remove.py
Co-authored-by: Peter Rowlands (변기호) <[email protected]>
This commit is contained in:
committed by
Peter Rowlands (변기호)
co-authored by
Peter Rowlands
parent
02681f2e65
commit
e19824fd2e
@@ -134,7 +134,7 @@ class BaseStashQueue(ABC):
|
||||
def remove(
|
||||
self,
|
||||
revs: Collection[str],
|
||||
_all: bool = False,
|
||||
all_: bool = False,
|
||||
queued: bool = False,
|
||||
**kwargs,
|
||||
) -> List[str]:
|
||||
@@ -149,7 +149,7 @@ class BaseStashQueue(ABC):
|
||||
Revisions (or names) which were removed.
|
||||
"""
|
||||
|
||||
if _all or queued:
|
||||
if all_ or queued:
|
||||
return self.clear()
|
||||
|
||||
removed: List[str] = []
|
||||
|
||||
@@ -351,11 +351,11 @@ class LocalCeleryQueue(BaseStashQueue):
|
||||
return status
|
||||
|
||||
def clear(self, *args, **kwargs):
|
||||
from .remove import clear
|
||||
from .remove import celery_clear
|
||||
|
||||
return clear(self, *args, **kwargs)
|
||||
return celery_clear(self, *args, **kwargs)
|
||||
|
||||
def remove(self, *args, **kwargs):
|
||||
from .remove import remove
|
||||
from .remove import celery_remove
|
||||
|
||||
return remove(self, *args, **kwargs)
|
||||
return celery_remove(self, *args, **kwargs)
|
||||
|
||||
@@ -92,7 +92,7 @@ def _get_names(entries: Iterable[Union["QueueEntry", "QueueDoneResult"]]):
|
||||
return names
|
||||
|
||||
|
||||
def clear(self: "LocalCeleryQueue", **kwargs) -> List[str]:
|
||||
def celery_clear(self: "LocalCeleryQueue", **kwargs) -> List[str]:
|
||||
"""Remove entries from the queue.
|
||||
|
||||
Arguments:
|
||||
@@ -125,7 +125,7 @@ def clear(self: "LocalCeleryQueue", **kwargs) -> List[str]:
|
||||
return removed
|
||||
|
||||
|
||||
def remove(
|
||||
def celery_remove(
|
||||
self: "LocalCeleryQueue",
|
||||
revs: Collection[str],
|
||||
queued: bool = False,
|
||||
@@ -140,7 +140,7 @@ def remove(
|
||||
queued: Remove all queued tasks.
|
||||
failed: Remove all failed tasks.
|
||||
success: Remove all success tasks.
|
||||
all: Remove all tasks.
|
||||
all_: Remove all tasks.
|
||||
|
||||
Returns:
|
||||
Revisions (or names) which were removed.
|
||||
|
||||
Reference in New Issue
Block a user