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