New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sidejobs

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sidejobs

  • 5.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version Code Climate Build Status Dependency Status

Sidejobs

Versatile async database based jobs for rails.

Why

I did this gem to:

  • Avoid the need to install another admin interface.
  • Simplify the job api by having close integration to rails.
  • Using sql instead of redis to never lose jobs.

Install

Put this line in your Gemfile:

gem 'sidejobs'

Then bundle:

$ bundle

Configuration

Generate the sidejobs configuration and migration file:

$ bundle exec rails g sidejobs:install

Set the global settings:

Sidejobs.configure do |config|
  config.max_attempts = 3
  config.sleep_delay = 15
  config.batch_size = 20
end

Run the migration to create the sidejobs table:

$ bundle exec rake db:migrate

Assign the sidejobs adapter to the environments:

Rails.application.configure do
  config.active_job.queue_adapter = :sidejobs
end

Usage

Daemon

To control the daemon, use the rake tasks:

$ bundle exec rake sidejobs:start
$ bundle exec rake sidejobs:stop
$ bundle exec rake sidejobs:restart

Queue

You can deliver mails using deliver_later:

UserMailer.invite('someone@mail.com').deliver_later

Or perform jobs using perform_later:

SendNewsletterJob.perform_later

Management

No admin interface, all is done using Sidejobs::Job model:

Sidejobs::Job.failing.where('attempts > ?', 3).destroy_all

Contributing

Any issue, pull request, comment of any kind is more than welcome!

I will mainly ensure compatibility to last versions of Ruby, Rails and PostgreSQL. 

Credits

This gem is maintained and funded by museways.

License

It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

FAQs

Package last updated on 07 Nov 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

  • 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