Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to prevent cli.dispatch() from terminating entire process tree? #227

Open
ludbek opened this issue Apr 4, 2015 · 5 comments

Comments

@ludbek
Copy link

ludbek commented Apr 4, 2015

I have a function which makes multiple cal to cli.dispatch(). Unfortunately cli.dispatch() terminates the entire process tree and returns to the system. Is there a way to prevent this?

@bitprophet
Copy link
Member

Why are you calling it multiple times?

Ideally - though I don't think we're there yet - anybody using Invoke as a library would never touch anything inside cli.py because all the tools they need would be in collection, tasks etc.

So, curious what your use case is and why dispatch seems to be the best way to implement it right now. Either there's a thing we have that you aren't seeing, or there's wisdom here we can use to make things more ideal :)

My guess is that you've got something covered under #170.

@ludbek
Copy link
Author

ludbek commented Apr 7, 2015

please visite easypy. its totally experimental n am working on stable version. may be i could use some of you suggestions :)

@ludbek
Copy link
Author

ludbek commented Apr 19, 2015

@bitprophet I have a task with following signature def meta(key_val):, I tried this Executor(dcollection).execute('meta', {'key_val' : 'version'}) to execute the task. Which yields following error:

 64         # Handle top level kwargs (the name gets overwritten below)
     65         # Normalize input
---> 66         debug("Examining top level tasks {0!r}".format([x[0] for x in tasks]))
     67         tasks = self._normalize(tasks)
     68         debug("Tasks with kwargs: {0!r}".format(tasks))

Note: dcollection was obtained importing tasks file and running Collection.from_module(tasks).

@bitprophet
Copy link
Member

This definitely sounds like it belongs under #170, for the record.

What actual error did you get, though? The above is just showing that it executed one of the debug lines :) I don't see a traceback.

@johnraz
Copy link

johnraz commented Jan 16, 2019

@bitprophet should we close this and follow up in #170?
Maybe we should at least add the proper label to know it has been triaged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants