Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed Navvy::Worker.daemonize

  • Loading branch information...
commit 71b22a747088c88e3a89028dc1e97b628e4a4766 1 parent fe4911f
@jeffkreeftmeijer authored
Showing with 0 additions and 29 deletions.
  1. +0 −29 lib/navvy/worker.rb
View
29 lib/navvy/worker.rb
@@ -49,34 +49,5 @@ def self.fetch_and_run_jobs
)
end
end
-
- ##
- # Daemonize the worker
-
- def self.daemonize(*args)
- if defined?(ActiveRecord)
- # Sets ActiveRecord's logger to Navvy a new Logger instance
- ActiveRecord::Base.logger = Logger.new(STDOUT)
- end
-
- # If #daemonize does not receive any arguments, the options variable will
- # contain an empty hash, and the ARGV of the environment will be used instead
- # of the :ARGV options from Daemons#run_proc. However, if the *args param has been set
- # this will be used instead of the environment's ARGV for the Daemons.
- options = args.empty? ? {} : {:ARGV => args}
-
- # Finally, the directory store mode will be set to normal and the Daemons PID file
- # will be stored inside tmp/pids of the application.
- options.merge!({:dir_mode => :normal, :dir => 'tmp/pids'})
-
- # Ensures that the tmp/pids folder exists so that the process id file can properly be stored
- %x(mkdir -p tmp/pids)
-
- # Runs the Navvy Worker inside a Daemon
- Daemons.run_proc('navvy', options) do
- Navvy::Worker.start
- end
- end
-
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.