Project

qmin

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Simple framwork to coordinate background tasks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 2.5.3
>= 0
>= 0
>= 0
 Project Readme

Build Status Dependency Status Code Climate

Qmin

Enables your application to handle method calls in the background without the need to write a worker for every task.

Assumptions

You can transparently call methods on instances that adhere to some assumptions Qmin makes about your code:

  • Classes (i.e. ActiveRecord Models) have a #find class method that takes an ID as an argument and instantiates an instance of that class.
  • Instances of that class have a public #id method that returns a value which can be used by the #find class method to instantiate that instance.

Installation

Add this line to your application's Gemfile:

gem 'qmin'

And then execute:

$ bundle

Or install it yourself as:

$ gem install qmin

Usage

Qmin::Strategy

Currently these strategies are implemented:

  • Noop (does nothing)
  • Inline (calls the method inline, helpful for testing or development)
  • Resque (moves the work off to the resque queue)

Todo

  • better documentation :)
  • Qmin::Strategy::DelayedJob
  • Qmin::Strategy::Sidekiq

Contributing

  1. Fork it
  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