You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation I tryed first of all this configuration, considering that I placed that hook function in the same file and, as you can read later, in the file called hooks.py in its working directory:
tid = async('subprocess.run',
['bash', '/tmp/test.sh', 'test'],
stdout=PIPE,
task_name='example-{}'.format(uuid4().hex),
hook='hooks.hook_example' # optional, run action when result will be available
)
This way it returns, as I can read from stdout:
[Q] ERROR malformed return hook 'hooks.hook_example' for [example-a4b92b55f392441d8fee85f22c5311d3]
So I placed that hooks, in the async init, as an callable object (not a string):
import application_name.hooks
tid = async('subprocess.run',
['bash', '/tmp/test.sh', 'test'],
stdout=PIPE,
task_name='example-{}'.format(uuid4().hex),
hook=application_name.hooks.hook_example # optional, run action when result will be available
)
It doesn't notify any errors or warning, this way it should be executed succesfully but... But nothing was called, I put a file creation in a temporary folder to be sure that it was called or not.
According to the documentation I tryed first of all this configuration, considering that I placed that hook function in the same file and, as you can read later, in the file called hooks.py in its working directory:
This way it returns, as I can read from stdout:
So I placed that hooks, in the async init, as an callable object (not a string):
It doesn't notify any errors or warning, this way it should be executed succesfully but... But nothing was called, I put a file creation in a temporary folder to be sure that it was called or not.
So, I think it could be usefull having these:
The text was updated successfully, but these errors were encountered: