Skip to content

Issue with "on_thread_error" override #120

Closed
@chiraggshah

Description

@chiraggshah

I am trying to override on_thread_error by adding the following in application.rb.

config.solid_queue.on_thread_error = ->(exception) {
  puts "*" * 100
  puts "exception: #{exception}"

  # do something

  Rails.error.report(exception, source: "solid_queue", severity: :error)
}

I have a sample job to trigger the above

class SendMailJob < ApplicationJob
  def perform
    raise StandardError
  end
end

But the proc doesn't get executed when I run SendMailJob.perform_later in the rails console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions