Module: SolidQueue::Processes::Runnable

Includes:
Supervised
Included in:
Poller
Defined in:
lib/solid_queue/processes/runnable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Supervised

#supervised_by

Instance Attribute Details

#mode=(value) ⇒ Object

Sets the attribute mode

Parameters:

  • value

    the value to set the attribute mode to.



7
8
9
# File 'lib/solid_queue/processes/runnable.rb', line 7

def mode=(value)
  @mode = value
end

Instance Method Details

#startObject



9
10
11
12
13
14
15
16
17
# File 'lib/solid_queue/processes/runnable.rb', line 9

def start
  @stopping = false

  SolidQueue.instrument(:start_process, process: self) do
    run_callbacks(:boot) { boot }
  end

  run
end

#stopObject



19
20
21
22
# File 'lib/solid_queue/processes/runnable.rb', line 19

def stop
  @stopping = true
  @thread&.join
end