Resque

Resque is a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.

Support for Resque instrumentation was added in AppSignal for Ruby gem version 0.8.

Support for automatic Resque instrumentation was added in AppSignal for Ruby gem version 2.11.

Integration

Since AppSignal Ruby gem 2.11 and newer Resque integration is automatic. If you have previously included or extended modules in your Resque job classes, they can now be removed.

Older integration

In older versions of the AppSignal Ruby gem (2.10 and older) the following steps were needed to instrument Resque jobs. If you have upgraded to the latest version of the Ruby gem, these steps are no longer needed and will result in a deprecation warning being logged and printed.

It was needed to add an instrumentation module to Resque jobs classes.

class MyWorker
  # Add the following line for older AppSignal Ruby gem versions
  extend Appsignal::Integrations::ResquePlugin
 
  def self.perform(*args)
    # ...
  end
end

Active Job support

The Resque integration is compatible with Active Job.

Upgrade to version 2.11.0 of the Ruby gem or newer for improved support.

Older Active Job support

In older versions of the AppSignal Ruby gem (2.10 and older) the following steps were needed to instrument Resque jobs. If you have upgraded to the latest version of the Ruby gem, these steps are no longer needed and will result in a deprecation warning being logged and printed.

When using ActiveJob, it was needed to include Appsignal::Integrations::ResqueActiveJobPlugin.

class MyActiveJobWorker < ApplicationJob
  # Add the following line for older AppSignal Ruby gem versions
  include Appsignal::Integrations::ResqueActiveJobPlugin
 
  queue_as :default
 
  def perform(*args)
    # ...
  end
end

Example apps

We've added a Rails 5 + Resque example app to our examples repository. Please take a look if you're having trouble getting AppSignal for Resque configured.

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial