lib/tasks/switchman.rake in switchman-1.16.0 vs lib/tasks/switchman.rake in switchman-2.0.0
- old
+ new
@@ -62,12 +62,12 @@
if ::Rails.env.test?
require 'switchman/test_helper'
TestHelper.recreate_persistent_test_shards(dont_create: true)
end
- ::Shackles.activate(:deploy) do
- Shard.default.database_server.unshackle do
+ ::GuardRail.activate(:deploy) do
+ Shard.default.database_server.unguard do
begin
categories = categories.call if categories.respond_to?(:call)
Shard.with_each_shard(scope, categories, options) do
shard = Shard.current
puts "#{shard.id}: #{shard.description}"
@@ -81,10 +81,10 @@
::ActiveRecord::Base.connection_pool.spec.config.stringify_keys).configurations
new_configs = remaining_configs + new_config
::ActiveRecord::Base.configurations = new_configs
end
- shard.database_server.unshackle do
+ shard.database_server.unguard do
old_actions.each { |action| action.call(*task_args) }
end
nil
end
rescue => e