Class: SolidQueue::Processes::Base
Instance Attribute Summary collapse
Instance Method Summary
collapse
#handle_thread_error, #wrap_in_app_executor
#process_id
#wake_up
Methods included from Procline
#procline
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
11
12
13
14
|
# File 'lib/solid_queue/processes/base.rb', line 11
def initialize(*)
@name = generate_name
@stopped = false
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
9
10
11
|
# File 'lib/solid_queue/processes/base.rb', line 9
def name
@name
end
|
Instance Method Details
#hostname ⇒ Object
20
21
22
|
# File 'lib/solid_queue/processes/base.rb', line 20
def hostname
@hostname ||= Socket.gethostname.force_encoding(Encoding::UTF_8)
end
|
#kind ⇒ Object
16
17
18
|
# File 'lib/solid_queue/processes/base.rb', line 16
def kind
self.class.name.demodulize
end
|
28
29
30
|
# File 'lib/solid_queue/processes/base.rb', line 28
def metadata
{}
end
|
#pid ⇒ Object
24
25
26
|
# File 'lib/solid_queue/processes/base.rb', line 24
def pid
@pid ||= ::Process.pid
end
|
#stop ⇒ Object
32
33
34
|
# File 'lib/solid_queue/processes/base.rb', line 32
def stop
@stopped = true
end
|