EOX GitLab Instance

Commit 8eb4b400 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing LICENSE

Adding timeout option for queue CLI
parent 11881a4f
Pipeline #13254 passed with stage
in 45 seconds
MIT License MIT License
Copyright (c) 2021, Fabian Schindler Copyright (C) 2021 EOX IT Services GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
...@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ...@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
...@@ -10,7 +10,9 @@ with open('README.rst') as readme_file: ...@@ -10,7 +10,9 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file: with open('HISTORY.rst') as history_file:
history = history_file.read() history = history_file.read()
requirements = ['Click>=7.0', ] requirements = [
'Click>=7.0',
]
setup_requirements = ['pytest-runner', ] setup_requirements = ['pytest-runner', ]
...@@ -33,7 +35,8 @@ setup( ...@@ -33,7 +35,8 @@ setup(
description="", description="",
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'vsq-sync=vsq.queue:cli', 'vsq=vsq.queue:cli',
'vsq-async=vsq.queue:cli',
], ],
}, },
install_requires=requirements, install_requires=requirements,
......
...@@ -300,8 +300,9 @@ def daemon(ctx, name, handler): ...@@ -300,8 +300,9 @@ def daemon(ctx, name, handler):
@click.argument('value', type=str) @click.argument('value', type=str)
@click.option('-j', '--json', 'as_json', is_flag=True, type=bool) @click.option('-j', '--json', 'as_json', is_flag=True, type=bool)
@click.option('-w', '--wait', is_flag=True, type=bool) @click.option('-w', '--wait', is_flag=True, type=bool)
@click.option('-t', '--timeout', type=int, default=None)
@click.pass_context @click.pass_context
def message(ctx, name, value, as_json=False, wait=False): def message(ctx, name, value, as_json=False, wait=False, timeout=None):
"""Send a message to the specified queue""" """Send a message to the specified queue"""
message = value message = value
...@@ -313,7 +314,7 @@ def message(ctx, name, value, as_json=False, wait=False): ...@@ -313,7 +314,7 @@ def message(ctx, name, value, as_json=False, wait=False):
if wait: if wait:
try: try:
result = task.get() result = task.get(timeout)
print(result) print(result)
return 0 return 0
except TaskFailedException as e: except TaskFailedException as e:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment