Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

athoune/ruby-tempest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby tempest

Ruby client for joining a tempest cluster.

With this gem, you can build a worker in plain old sequential ruby with a simple DSL, using your favorite gems.

Test

Launch a redis server:

redis-server

Lauch the tests:

rspec

Code

The foreman:

require 'tempest'

tempest do
  worker :working do #The working queue
    work :foo, nil, 'World' #nil is for 'no response needed'
  end
end

The worker :

require 'tempest'

tempest do
  worker :working do
    on :foo do |context, name|
      p "hello #{name}"
      context.stop # stop the event loop
    end
  end.start_loop #start the event loop
end

The queue is handled by Redis, you can start many workers, after or before the foreman, it doesn't care.

Status

Alpha.

Tempestas

The tempest gem already exists, not tempestas. Latin ruled the world.

Licence

MIT

About

ruby client for the tempest cluster.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published