Skip to content

Commit

Permalink
feat: add ability to load definitions in cp
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Sep 1, 2023
1 parent f164cd0 commit 35c1f4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion taskqueue_cli/taskqueue_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import math
import importlib

import click
from tqdm import tqdm
Expand Down Expand Up @@ -72,7 +73,8 @@ def release(queuepath):
@main.command()
@click.argument("src")
@click.argument("dest")
def cp(src, dest):
@click.option('--load', default=None, help="Load a module to get task definitions.", show_default=True)
def cp(src, dest, load):
"""
Copy the contents of a queue to another
service or location. Do not run this
Expand All @@ -82,6 +84,9 @@ def cp(src, dest):
but you can copy an fq to sqs. The mv
command supports sqs queues.
"""
if load:
importlib.import_module(load)

src = normalize_path(src)
dest = normalize_path(dest)

Expand Down

0 comments on commit 35c1f4f

Please sign in to comment.