Class: Evrone::Common::AMQP::Supervisor::Threaded::Task

Inherits:
Struct
  • Object
show all
Defined in:
lib/evrone/common/amqp/supervisor/threaded.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attemptObject

Returns the value of attribute attempt.



14
15
16
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 14

def attempt
  @attempt
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



12
13
14
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 12

def id
  @id
end

#methodObject

Returns the value of attribute method

Returns:

  • (Object)

    the current value of method



12
13
14
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 12

def method
  @method
end

#objectObject

Returns the value of attribute object

Returns:

  • (Object)

    the current value of object



12
13
14
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 12

def object
  @object
end

#start_atObject

Returns the value of attribute start_at.



14
15
16
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 14

def start_at
  @start_at
end

#threadObject

Returns the value of attribute thread.



14
15
16
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 14

def thread
  @thread
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 16

def alive?
  !!(thread && thread.alive?)
end

#inspectObject



20
21
22
23
24
25
26
27
28
# File 'lib/evrone/common/amqp/supervisor/threaded.rb', line 20

def inspect
  %{#<Task
       object=#{object.to_s}
       method=#{method.inspect}
       id=#{id.inspect}
       alive=#{alive?}
       attempt=#{attempt}
       start_at=#{start_at}> }.gsub("\n", ' ').gsub(/ +/, ' ').strip
end