mirror of
https://github.com/plashchynski/crono.git
synced 2026-01-11 21:10:24 +01:00
Write PID in the daemon mode
This commit is contained in:
@@ -24,7 +24,7 @@ module Crono
|
||||
|
||||
setup_log
|
||||
|
||||
write_pid unless config.daemonize
|
||||
write_pid if config.daemonize
|
||||
load_rails
|
||||
Cronotab.process(File.expand_path(config.cronotab))
|
||||
print_banner
|
||||
|
||||
@@ -11,7 +11,7 @@ describe Crono::CLI do
|
||||
expect(cli).to receive(:start_working_loop)
|
||||
expect(cli).to receive(:parse_options)
|
||||
expect(cli).to receive(:parse_command)
|
||||
expect(cli).to receive(:write_pid)
|
||||
expect(cli).not_to receive(:write_pid)
|
||||
expect(Crono::Cronotab).to receive(:process)
|
||||
cli.run
|
||||
end
|
||||
@@ -25,7 +25,8 @@ describe Crono::CLI do
|
||||
expect(cli).to receive(:start_working_loop_in_daemon)
|
||||
expect(cli).to receive(:parse_options)
|
||||
expect(cli).to receive(:parse_command)
|
||||
expect(cli).not_to receive(:write_pid)
|
||||
expect(cli).to receive(:setup_log)
|
||||
expect(cli).to receive(:write_pid)
|
||||
expect(Crono::Cronotab).to receive(:process)
|
||||
cli.run
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user