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
function isPlainObject(o) { | |
return o && toString.call(o) === '[object Object]' && 'isPrototypeOf' in o; | |
} | |
function isArray(o) { | |
return toString.call(o) == '[object Array]'; | |
} | |
function objectToString(val) { | |
var INDENT = ' '; |
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
# config/initializers/delayed_job_mongoid.rb | |
module Delayed | |
module Backend | |
module ActiveRecord | |
class Job < ::ActiveRecord::Base | |
def self.before_fork | |
::ActiveRecord::Base.clear_all_connections! | |
::Mongoid.master.connection.close | |
end |
NewerOlder