Logo of AppSignal

Menu
Docs navigation

Resque

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

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

Table of Contents

Integration

To enable instrumentation for Resque jobs you need to load in the AppSignal Resque plugin in your job classes. AppSignal will then start monitoring these jobs without further configuration.

1
2
3
4
5
6
7
8
class MyWorker
  # Add the following line:
  extend Appsignal::Integrations::ResquePlugin

  def self.perform(*args)
    # ...
  end
end

Resque with ActiveJob

When using ActiveJob, include Appsignal::Integrations::ResqueActiveJobPlugin instead. AppSignal will then start monitoring these jobs without further configuration.

1
2
3
4
5
6
7
8
9
10
class MyActiveJobWorker < ApplicationJob
  # Add the following line:
  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.