EOX GitLab Instance
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ESA
PRISM
vsq
Commits
8eb4b400
Commit
8eb4b400
authored
May 10, 2021
by
Fabian Schindler
Browse files
Fixing LICENSE
Adding timeout option for queue CLI
parent
11881a4f
Pipeline
#13254
passed with stage
in 45 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
LICENSE
View file @
8eb4b400
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
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
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
SOFTWARE.
setup.py
View file @
8eb4b400
...
...
@@ -10,7 +10,9 @@ with open('README.rst') as readme_file:
with
open
(
'HISTORY.rst'
)
as
history_file
:
history
=
history_file
.
read
()
requirements
=
[
'Click>=7.0'
,
]
requirements
=
[
'Click>=7.0'
,
]
setup_requirements
=
[
'pytest-runner'
,
]
...
...
@@ -33,7 +35,8 @@ setup(
description
=
""
,
entry_points
=
{
'console_scripts'
:
[
'vsq-sync=vsq.queue:cli'
,
'vsq=vsq.queue:cli'
,
'vsq-async=vsq.queue:cli'
,
],
},
install_requires
=
requirements
,
...
...
vsq/queue.py
View file @
8eb4b400
...
...
@@ -300,8 +300,9 @@ def daemon(ctx, name, handler):
@
click
.
argument
(
'value'
,
type
=
str
)
@
click
.
option
(
'-j'
,
'--json'
,
'as_json'
,
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
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"""
message
=
value
...
...
@@ -313,7 +314,7 @@ def message(ctx, name, value, as_json=False, wait=False):
if
wait
:
try
:
result
=
task
.
get
()
result
=
task
.
get
(
timeout
)
print
(
result
)
return
0
except
TaskFailedException
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment