Module: SolidQueue::AppExecutor

Included in:
Dispatcher::ConcurrencyMaintenance, Pool, Processes::Base, Scheduler::RecurringSchedule
Defined in:
lib/solid_queue/app_executor.rb

Instance Method Summary collapse

Instance Method Details

#handle_thread_error(error) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/solid_queue/app_executor.rb', line 13

def handle_thread_error(error)
  SolidQueue.instrument(:thread_error, error: error)

  if SolidQueue.on_thread_error
    SolidQueue.on_thread_error.call(error)
  end
end

#wrap_in_app_executor(&block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/solid_queue/app_executor.rb', line 5

def wrap_in_app_executor(&block)
  if SolidQueue.app_executor
    SolidQueue.app_executor.wrap(&block)
  else
    yield
  end
end