Skip to content

Commit 75a33eb

Browse files
feat(cli): add copy to ptq
1 parent cd7cf65 commit 75a33eb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

taskqueue_cli/taskqueue_cli.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,22 @@ def status(queuepath):
6161
def release(queuepath):
6262
"""Release all tasks from their leases."""
6363
TaskQueue(normalize_path(queuepath)).release_all()
64+
65+
@main.command()
66+
@click.argument("src")
67+
@click.argument("dest")
68+
def copy(src, dest):
69+
"""
70+
Copy the contents of a queue to another
71+
service or location.
72+
"""
73+
src = normalize_path(src)
74+
dest = normalize_path(dest)
75+
76+
tqd = TaskQueue(dest)
77+
tqs = TaskQueue(src)
78+
79+
tqd.insert(tqs)
80+
81+
82+

0 commit comments

Comments
 (0)