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

JobQueue example is outdated #1305

Closed
dioh opened this issue Apr 13, 2015 · 2 comments
Closed

JobQueue example is outdated #1305

dioh opened this issue Apr 13, 2015 · 2 comments
Assignees

Comments

@dioh
Copy link

@dioh dioh commented Apr 13, 2015

In the documentation of JobQueue
http://pydoc.net/Python/Fabric/1.4.0/fabric.job_queue/

The example shows a one parameter constructor while actually its a two parameter method.

@zerok
Copy link

@zerok zerok commented Apr 13, 2015

You are right. Once changed there is also the issue that the sample with threading as parallelisation method doesn't work because threads don't have an exitcode.

I am completely new to the internals of fabric but shouldn't a try/catch block within the WrappedCallableTask (or Task for that matter) class solve this so that we get an exit code depending on if an exception was thrown during the task execution or not?

Or is threading at this point not really a use-case anymore?

Additionally, would it make sense to move this whole sample code into a bunch of unittests?

@sivy
Copy link

@sivy sivy commented Apr 13, 2015

The example is still wrong in 1.9.2.

# Make a job_queue with a bubble of len 5, and have it print verbosely
jobs = JobQueue(5)
jobs._debug = True
@sivy sivy self-assigned this Apr 13, 2015
crlane pushed a commit to crlane/fabric that referenced this issue Apr 13, 2015
crlane pushed a commit to crlane/fabric that referenced this issue Apr 13, 2015
- Addresses this comment on issue:
   fabric#1305 (comment)
- no status code to set for Threads anyway
- only processes used in fabric internals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.