Module: JobGroups::ClassMethods

Defined in:
lib/delayed_job_groups/job_groups.rb

Instance Method Summary collapse

Instance Method Details

#has_job_groups?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/delayed_job_groups/job_groups.rb', line 12

def has_job_groups?
  !!@lock_group_factory
end

#job_group(&block) ⇒ Object



8
9
10
# File 'lib/delayed_job_groups/job_groups.rb', line 8

def job_group(&block)
  @lock_group_factory = block
end

#lock_group(payload) ⇒ Object



16
17
18
# File 'lib/delayed_job_groups/job_groups.rb', line 16

def lock_group(payload)
  @lock_group_factory.call(payload)
end