-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
Fix daemonization broken in #219 #224
Conversation
it 'raises if Celluloid is already loaded' do | ||
expect(cli).to receive(:celluloid_loaded?).and_return(true) | ||
args = { daemon: true, logfile: '/dev/null' } | ||
expect{ cli.send(:daemonize, args) }.to raise_error(RuntimeError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space missing to the left of {.
a2079fd
to
3acea82
Compare
end | ||
|
||
it 'raises if logfile is not set' do | ||
expect { cli.send(:daemonize, { daemon: true }) }.to raise_error(ArgumentError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant curly braces around a hash parameter.
|
||
EnvironmentLoader.load(options) | ||
|
||
load_celluloid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to load celluloid later so we could attach logger properly.
@phstc you good with this PR? :) |
@@ -64,21 +64,27 @@ def run(args) | |||
private | |||
|
|||
def load_celluloid | |||
raise "Celluloid cannot be required until here, or it will break Shoryuken's daemonization" if defined?(::Celluloid) && Shoryuken.options[:daemon] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phstc it's just moved from here :)
@mariokostelac looks good to me |
Sorry for breaking this 😩 and thanks for fixing it @mariokostelac ! |
No description provided.