Module: SwitchmanInstJobs::ActiveRecord::ConnectionAdapters::ConnectionPool

Defined in:
lib/switchman_inst_jobs/active_record/connection_adapters/connection_pool.rb

Instance Method Summary collapse

Instance Method Details

#shardObject


5
6
7
8
9
10
11
# File 'lib/switchman_inst_jobs/active_record/connection_adapters/connection_pool.rb', line 5

def shard
  if connection_klass == ::Delayed::Backend::ActiveRecord::AbstractJob
    return shard_stack.last || ::Switchman::Shard.current(::ActiveRecord::Base).delayed_jobs_shard
  end

  super
end