Module: SwitchmanInstJobs::Delayed::Worker::ClassMethods

Defined in:
lib/switchman_inst_jobs/delayed/worker.rb

Instance Method Summary collapse

Instance Method Details

#shard(shard_id) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/switchman_inst_jobs/delayed/worker.rb', line 34

def shard(shard_id)
  if shard_id
    shard = ::Switchman::Shard.lookup(shard_id)
    return shard if shard
  end
  ::Switchman::Shard.default.delayed_jobs_shard
end