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

Create separate class to execute jobs #86

Merged
merged 2 commits into from
Feb 17, 2014
Merged

Conversation

mauricio
Copy link
Collaborator

This is a proposal for #5. Creates a separate class to execute the job instead of doing the execution inside the worker. This allows us to have different execution mechanisms, from the current "just run", to a forking runner and in the future other threaded runners (that would be better suited for JRuby and Rubinius).

This is far from being a full implementation (and still lacks tests for forking more than one worker at a time) but I think it would be nice to have it here so we can discuss this before I dig deeper into the rabbit hole.

This is a proposal for bkeepers#5. Creates a separate
class to execute the job instead of doing the
execution inside the worker. This allows us to
have different execution mechanisms, from the
current "just run", to a forking runner and
in the future other threaded runners (that
would be better suited for JRuby and Rubinius).
@@ -70,4 +71,4 @@ def self.running?(service)
end
end

Qu.logger = Logger.new('/dev/null')
Qu.logger = Logger.new(STDOUT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it really dirty when running the tests. I'm thinking maybe we do an ENV var flag to log to stdout vs nowhere. That would keep tests to dots by default but allow flipping to verbose output. The first time I ran the tests locally I thought that things failed and then realized they didn't.

jnunemaker pushed a commit that referenced this pull request Feb 17, 2014
Create separate class to execute jobs
@jnunemaker jnunemaker merged commit 223d662 into bkeepers:master Feb 17, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants