Project

tempestas

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Client for the tempest cluster
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 2.7

Runtime

= 2.2.2
 Project Readme

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