Created
December 5, 2017 13:04
-
-
Save michaeldever/85631b0a66ecae341556f9a1a838e73a to your computer and use it in GitHub Desktop.
ActiveRecord Connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Daemons.run_proc(options) do | |
begin | |
# NOTE: Ensure we have a database connection | |
defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection | |
rescue StandardError => e | |
puts e.message | |
puts e.backtrace | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment