a redis backend for ruote that isn't based on keys('*') with filters.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
README.rdoc
ruote-backend.gemspec

README.rdoc

Another implementation for Redis persistence for ruote 2.1 (a Ruby workflow engine). As well as a worker to atomically get messages from the storage system. The message system uses resque as a backend which means the resque workers (setup to talk to the ruote storage) will be able to perform the ruote work. Resque scheduler is also used for ruotes scheduled items.

usage

The storage is instantiate by passing a redis-rb instance to the storage.

require 'redis'
require 'ruote'
require 'ruote-backend'

engine = Ruote::Engine.new(
  Ruote::Worker.new(
    Ruote::Backend::Storage.new(
      :storage => Ruote::Redis::Storage.new(::Redis.new(:db => 14, :thread_safe => true), {}), {})))

Tested with Redis 2.0.4 (redis-rb 2.0.13).

running tests

assuming you have

ruote/
ruote-backend/

start a redis server instance (host 'localhost', port 6379, or wherever) and then from ruote-backend

bundle install --path vendor
  • unit tests :

from ruote-backend/ and do

REDIS_HOST="localhost" REDIS_PORT=6379 bundle exec ruby ../ruote/test/unit/storage.rb -- --backend
  • functional tests :

from ruote-backend/ and do

REDIS_HOST="localhost" REDIS_PORT=6379 bundle exec ruby ../ruote/test/functional/test.rb -- --backend
  • backend tests :

from ruote-backend/ and do

RUOTE_DIR="../ruote" REDIS_HOST="localhost" REDIS_PORT=6379 bundle exec ruby test/test.rb -- --backend