Commit e17bc3af authored by Douwe Maan's avatar Douwe Maan

Merge branch 'clear-connections-before-starting-sidekiq' into 'master'

Clear AR connections before starting Sidekiq

Closes gitlab-com/infrastructure#1139

See merge request !9773
parents 99b9fbb9 fb697e69
---
title: Clear ActiveRecord connections before starting Sidekiq
merge_request:
author:
......@@ -19,6 +19,12 @@ Sidekiq.configure_server do |config|
chain.add Gitlab::SidekiqStatus::ClientMiddleware
end
config.on :startup do
# Clear any connections that might have been obtained before starting
# Sidekiq (e.g. in an initializer).
ActiveRecord::Base.clear_all_connections!
end
# Sidekiq-cron: load recurring jobs from gitlab.yml
# UGLY Hack to get nested hash from settingslogic
cron_jobs = JSON.parse(Gitlab.config.cron_jobs.to_json)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment