Skip to content
Browse files

Updated installation section README to use bundler

  • Loading branch information...
1 parent 2cb4413 commit 2cecb1b7b5c5ccb7a031b52c8a3f1673588fdb56 @kpumuk kpumuk committed Jun 28, 2011
Showing with 17 additions and 19 deletions.
  1. +17 −19 README.rdoc
View
36 README.rdoc
@@ -35,37 +35,29 @@ you're going to like it.
== How to install?
-There are two options when approaching db-charmer installation:
+Add the loops gem to your +Gemfile+:
-* using the gem (recommended)
-* install as a Rails plugin
+ gem 'loops'
-To install as a gem, add this to your environment.rb:
+And then run +bundle+ command.
- config.gem 'loops'
-
-And then run the command:
-
- sudo rake gems:install
-
-To install loops as a Rails plugin you need to do rhw following:
+To install loops as a Rails plugin you need to do the following:
./script/plugin install git://github.com/kovyrin/loops.git
-This will install the whole package in your vendor/plugins directory.
-For merb applications, just check out the code and place it to the vendor/plugins directory.
-
+This will install the whole package in your +vendor/plugins+ directory.
+For merb applications, just check out the code and place it to the +vendor/plugins+ directory.
After you are done with the installation, you need to generate binary and configuration
files by running:
./script/generate loops
This will create the following list of files:
-* <tt>./script/loops</tt> - binary file that will be used to manage your loops
-* <tt>./config/loops.yml</tt> - example configuration file
-* <tt>./app/loops/simple.rb</tt> - REALLY simple loop example
-* <tt>./app/loops/queue_loop.rb</tt> - simple ActiveMQ queue worker
+* <tt>./script/loops</tt> -- binary file that will be used to manage your loops
+* <tt>./config/loops.yml</tt> -- example configuration file
+* <tt>./app/loops/simple.rb</tt> -- REALLY simple loop example
+* <tt>./app/loops/queue_loop.rb</tt> -- simple ActiveMQ queue worker
== How to use?
@@ -179,10 +171,16 @@ We use monit to keep loop monitors runnings. You could use something like this i
check process loop-slow_logs with pidfile /your/project/current/tmp/pids/loop-slow_logs.pid
group loops
+ start program "/bin/bash -c 'cd /your/project/current && /usr/bin/bundle exec loops start slow_logs -p /your/project/shared/pids/loop-slow_logs.pid -e loops -d'"
+ stop program "/bin/bash -c 'cd /your/project/current && /usr/bin/bundle exec loops stop -p /your/project/shared/pids/loop-slow_logs.pid'"
+
+If you do not use bundler, you can do:
+
+ check process loop-slow_logs with pidfile /your/project/current/tmp/pids/loop-slow_logs.pid
+ group loops
start program "/your/project/current/script/loops start slow_logs -e loops -p tmp/pids/loop-slow_logs.pid -d"
stop program "/your/project/current/script/loops stop slow_logs -e loops -p tmp/pids/loop-slow_logs.pid"
-
== ActiveMQ-based workers? What's that?
In some of our worker loops we poll ActiveMQ queue and process its items to perform some

0 comments on commit 2cecb1b

Please sign in to comment.
Something went wrong with that request. Please try again.