Project

kyu

0.0
No commit activity in last 3 years
No release in over 3 years
SQS background processing for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

Kyu

Kyu - SQS background processing for Ruby.

Unlike Rescue and Sidekiq, Kyu does not rely on Redis. It is simple, reliable, and efficient way to handle background process in Ruby using SQS.

Installation

Add this line to your application's Gemfile:

gem 'kyu'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kyu

Usage

image_resize_worker.rb

require 'kyu'

class ImageResizerWorker
  include Kyu::Worker

  max_retries 3
  threadpool_size 10

  def process_message( msg )
    # ... Asyncronously resize the image
  end
end

kyu start -- image_resizing image_resize_worker.rb

image_resize_postman.rb

#!/usr/bin/env ruby
require 'kyu'

class ImageResizePostman
  include Kyu::Postman

  queue_name 'image_resizing'
end

if __FILE__ == $PROGRAM_NAME
  ImageResizePostman.send_message( url: ARGV[0], width: ARGV[1], height: ARGV[2] )
end

./image_resize_postman.rb URL_FOR_A_LARGE_IMG 640 1136

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