Socket
Book a DemoInstallSign in
Socket

rapidjob

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapidjob

0.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

RapidJob

RapidJob is a RabbitMQ-backed Ruby library for processing background jobs.

It's not complete yet!

Any class can include Rapid::Job.

class MyJob
  include Rapid::Job

  retry_count 5

  retry_delays [10, 20, 30, 40, 50]

  def self.fail
    puts 
  end

  def to_json
    '{}'
  end

  def self.from_json json_message
    new
  end

  def f s
    puts "hey hey hey, f is called: #{s}"
  end

  def self.g
    puts 'hey hey hey, g is called'
  end

  def self.h a, b
    puts "h is called with a: #{a}, b: #{b}"
  end
end

Then it's functions can be called in background:

mg = MyJob.new
mg.rapid.f "Salaam"

MyJob.rapid.g

MyJob.rapid.mission(g: nil, h: [1, 2])

To pop messages from MQ and run:

rake rapid:worker QUEUE=my_job

FAQs

Package last updated on 14 Aug 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.