README.md in react-0.0.1 vs README.md in react-0.0.2

- old
+ new

@@ -1,65 +1,68 @@ # React -React is a simple application that allows for remote execution of commands. -It uses Redis as a queue - it is blocking specified list and waits for new -entries - when an entry appears, then it is executing recognized command. +React is a simple application that allows for remote execution of commands, +and it uses Redis as a queue. ## Inspiration -It's inspired by Simon Willson's example of "Queue-activated shell scripts" -in his redis-tutorial: +It's inspired by Simon Willison's example of "Queue-activated shell scripts" +in his [redis tutorial](http://simonwillison.net/static/2010/redis-tutorial/): while [ 1 ] do redis-cli blpop restart-httpd 0 apache2ctl graceful done -## Examples +## Installation +You can simply install React using rubygems: + + sudo gem install react + +## Usage + Firs you have to prepare file with available commands. It can look like this: # my_commands.yml restart_httpd: | apache2ctl graceful restart_mysql: | /etc/init.d/mysql restart reboot: | reboot -And now you can start consumer. +And now you can start a consumer. react my_commands.yml -## Commands +## Pushing commands -While your consumer is working, you can push any of specified command to it's +While your consumer is working, you can push any of specified command to queue (default queue name is `queue`), eg: redis-cli lpush queue restart_httpd redis-cli lpush queue reboot +After that consumer will pick up enqueued command names from and execute +related commands. + ## Configuration There are few more runtime options, which can be useful for you. -* you can specify queue wihch will be consumed: +* you can specify queue which will be consumed: - react my_commands.yml --queue "my:queue:name" + react my_commands.yml --queue "my:queue:name" * you can specify the database to which consumer should connect: - react my_commands.yml --host "yourhost.com" --port 6379 --db 2 + react my_commands.yml --host "yourhost.com" --port 6379 --db 2 --password pass * and finally, you can demonize the consumer: - react my_commands.yml --daemonize - -## Links - -* [My website](http://nu7hatch.com/) -* [Simon Wilson's Redis tutorial](http://simonwillison.net/static/2010/redis-tutorial/) - + react my_commands.yml --daemon + ## Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a