class ActiveJob::QueueAdapters::QueueClassicAdapter - activejob-4.2.4 Documentation

# class ActiveJob::QueueAdapters::QueueClassicAdapter

## queue_classic adapter for Active Job¶ ↑

queue_classic provides a simple interface to a PostgreSQL-backed message queue. queue_classic specializes in concurrent locking and minimizing database load while providing a simple, intuitive developer experience. queue_classic assumes that you are already using PostgreSQL in your production environment and that adding another dependency (e.g. redis, beanstalkd, 0mq) is undesirable.

Read more about queue_classic here.

To use queue_classic set the queue_adapter config to `:queue_classic`.

    Rails.application.config.active_job.queue_adapter = :queue_classic

### Public Class Methods

build_queue(queue_name) click to toggle source

Builds a `QC::Queue` object to schedule jobs on.

If you have a custom `QC::Queue` subclass you'll need to subclass `ActiveJob::QueueAdapters::QueueClassicAdapter` and override the `build_queue` method.

    # File lib/active_job/queue_adapters/queue_classic_adapter.rb, line 40
    def build_queue(queue_name)
      QC::Queue.new(queue_name)
    end