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

delayed_job_memento

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delayed_job_memento

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Delayed Job Memento Gem Version

Delayed Jobs can be sentimental, save them as mementos so you don't have to forget.

Also, set quotas for delayed jobs.

Installation

Add this line to your Gemfile:

gem 'delayed_job_memento'

and run bundle

or without bundler:

$ gem install delayed_job_memento

####Then

Create migration for mementos:

$ rails g delayed_job_memento:install
$ rake db:migrate

Usage

####You probably shouldn't hold onto mementos forever:

# config/initializers

Delayed::Memento.expiration = 1.week

## keep quotas in mind, see below

####To set Quotas:

# config/initializers

Delayed::Quota.new(queue: 'cat emails', interval: 1.day, size: 100) # Don't send more than 100 cat emails per day
...

## Don't let any of your quota intervals exceed memento expiration time or that quota wont work

When a Quota is reached its queue is rebalanced so that remaining queue jobs run at the end of the quotas current lifetime.

####Get mementos

Delayed::Memento.all

Note

Only works with ActiveRecord as your delayed job backend.

TODO

  1. Tests
  2. More Backends
  3. More things to do with Mementos

Contributing

  1. Fork it ( http://github.com//delayed_job_memento/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

LICENSE

FAQs

Package last updated on 18 Feb 2014

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