Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add transient queue processing rake task

  • Loading branch information...
commit 4b195a4df7d3abf27a649d4f344465b8f88630ac 1 parent 53ffd0f
@rwdaigle authored
Showing with 9 additions and 23 deletions.
  1. +0 −2  Gemfile
  2. +2 −21 Gemfile.lock
  3. +7 −0 lib/tasks/queue.rake
View
2  Gemfile
@@ -28,8 +28,6 @@ end
group :development do
gem 'rspec-rails'
- gem 'heroku'
- gem 'foreman'
end
group :test do
View
23 Gemfile.lock
@@ -38,20 +38,9 @@ GEM
dynamic_form (1.1.4)
erubis (2.7.0)
eventmachine (0.12.10)
- excon (0.13.4)
execjs (1.4.0)
multi_json (~> 1.0)
- foreman (0.46.0)
- thor (>= 0.13.6)
haml (3.1.6)
- heroku (2.26.2)
- heroku-api (~> 0.2.1)
- launchy (>= 0.3.2)
- netrc (~> 0.7.2)
- rest-client (~> 1.6.1)
- rubyzip
- heroku-api (0.2.1)
- excon (~> 0.13.3)
hike (1.2.1)
htmlentities (4.3.1)
i18n (0.6.0)
@@ -61,8 +50,6 @@ GEM
thor (~> 0.14)
json (1.7.3)
kgio (2.7.4)
- launchy (2.1.0)
- addressable (~> 2.2.6)
lograge (0.0.4)
actionpack
activesupport
@@ -71,11 +58,10 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
make_resourceful (1.0.1)
- mime-types (1.18)
+ mime-types (1.19)
multi_json (1.3.5)
- netrc (0.7.2)
newrelic_rpm (3.3.4.1)
- nokogiri (1.5.2)
+ nokogiri (1.5.5)
permalink_fu (1.0.0)
pg (0.13.2)
polyglot (0.3.3)
@@ -110,8 +96,6 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
- rest-client (1.6.7)
- mime-types (>= 1.16)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
@@ -125,7 +109,6 @@ GEM
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.10.0)
- rubyzip (0.9.8)
sass (3.1.18)
sass-rails (3.2.5)
railties (~> 3.2.0)
@@ -171,9 +154,7 @@ PLATFORMS
DEPENDENCIES
clockwork
dynamic_form
- foreman
haml
- heroku
jquery-rails
lograge
make_resourceful
View
7 lib/tasks/queue.rake
@@ -8,4 +8,11 @@ namespace :queue do
task :work => :environment do
QueueWorker.new.start
end
+
+ desc "Work through the queue and exit when all jobs have been processed"
+ task :work_then_exit => :environment do
+ worker = QueueWorker.new
+ $queue.count.times { worker.work }
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.