Skip to content

Instantly share code, notes, and snippets.

@biow0lf
Created February 1, 2021 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biow0lf/ab83bafbc516c10c331c77bdef1f8e87 to your computer and use it in GitHub Desktop.
Save biow0lf/ab83bafbc516c10c331c77bdef1f8e87 to your computer and use it in GitHub Desktop.
on_worker_boot do
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
client = ::Rack::MockRequest.new Rails.application
%w[/].each do |url|
client.get url
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment