Class: Faktory::UnitOfWork

Inherits:
Struct
  • Object
show all
Defined in:
lib/faktory/fetch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#jobObject

Returns the value of attribute job

Returns:

  • (Object)

    the current value of job



4
5
6
# File 'lib/faktory/fetch.rb', line 4

def job
  @job
end

Instance Method Details

#acknowledgeObject



5
6
7
# File 'lib/faktory/fetch.rb', line 5

def acknowledge
  Faktory.server {|c| c.ack(jid) }
end

#fail(ex) ⇒ Object



9
10
11
# File 'lib/faktory/fetch.rb', line 9

def fail(ex)
  Faktory.server {|c| c.fail(jid, ex) }
end

#jidObject



13
14
15
# File 'lib/faktory/fetch.rb', line 13

def jid
  job['jid']
end