Changing rake resque job for Heroku compatibility

jamesperet 9 years ago
parent
commit
21d338e40d
2 changed files with 13 additions and 6 deletions
  1. 8 2
      lib/tasks/resque.rake
  2. 5 4
      readme.md

+ 8 - 2
lib/tasks/resque.rake

@@ -1,2 +1,8 @@
1
-require "resque/tasks" 
2
-task "resque:setup" => :environment
1
+require 'resque/tasks' 
2
+
3
+task "resque:setup" => :environment do 
4
+  ENV['QUEUE'] = '*' 
5
+end 
6
+
7
+desc "Alias for resque:work (To run workers on Heroku)" 
8
+task "jobs:work" => "resque:work"

+ 5 - 4
readme.md

@@ -32,10 +32,11 @@ A template for creating rails websites that includes the following:
32 32
 
33 33
 1. Create a new heroku app: ```heroku create new-app-name```
34 34
 2. Run ```figaro heroku:set -e production``` to copy env variables from ```config/application.yml```  and set them in heroku
35
-3. Add the heroku postgre addon:  ```heroku addons:add heroku-postgresql``` to create and configure a *postgres* database in heroku server
36
-4. Push to heroku:  ```git push heroku master``` to deploy the repo
37
-5. Migrate the database: ```heroku run rake db:migrate```
38
-6. Create the initial config and admin user: ```heroku run rake bootstrap:all```
35
+3. Add the heroku *postgre* addon:  ```heroku addons:add heroku-postgresql``` to create and configure a *postgres* database in heroku server
36
+4. Add the heroku *Redis to Go* addon: ```heroku addons:add redistogo```
37
+5. Push to heroku:  ```git push heroku master``` to deploy the repo
38
+6. Migrate the database: ```heroku run rake db:migrate```
39
+7. Create the initial config and admin user: ```heroku run rake bootstrap:all```
39 40
 
40 41
 ## Env Variables
41 42