Method: Exekutor::Internal::CLI::Daemon#validate!
- Defined in:
- lib/exekutor/internal/cli/daemon.rb
#validate! ⇒ void
This method returns an undefined value.
Raises an Error if a daemon is already running. Deletes the pidfile is the process is dead.
70 71 72 73 74 75 76 77 78 |
# File 'lib/exekutor/internal/cli/daemon.rb', line 70 def validate! case status when :running, :not_owned raise Error, "A worker is already running. Check #{pidfile}" else delete_pid end nil end |