module SolidQueue::AppExecutor

def handle_thread_error(error)

def handle_thread_error(error)
  SolidQueue.instrument(:thread_error, error: error)
  if SolidQueue.on_thread_error
    SolidQueue.on_thread_error.call(error)
  end
end

def wrap_in_app_executor(&block)

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