Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

activequeue

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

activequeue

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ActiveQueue

ActiveQueue is a Rails abstraction of queue configuration and background job creation/specification.

Queues and Background Job Runners are becoming as ubiquitous to Rails applications as Databases. Why not treat each of them as the same generic component, conforming to an interface and convention that is well understood.

Overview

ActiveQueue allows you to create jobs and place them on whatever queue you have set as a requirement in environment.rb. The first cut of this gem only supports DelayedJob and Resque. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both.

class EmailNotificationJob attr_accessor :user_id def initialize(options) self.user_id = options[:user_id] end def perform puts user_id end end emailNote = EmailNotificationJob.new({:user_id => 1}) job = ActiveQueue::Job.new(emailNote, :adapter => "resque", :queue_name => :file_queue)

With ActiveQueue you can send any job to the configured queue like so

ActiveQueue::Queue.enqueue(Jobs::ExampleJob,'bar') or ActiveQueue::Queue.enqueue(Jobs::MultiParamExampleJob,{:foo => 'bar',:foe => 'four', :fum => 'tail'})

FAQs

Package last updated on 17 Dec 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc