diff options
author | Andrey Kumanyaev <me@zzet.org> | 2012-10-09 00:19:07 +0400 |
---|---|---|
committer | Andrey Kumanyaev <me@zzet.org> | 2012-10-09 00:19:07 +0400 |
commit | 03836cc5917dd4cc1b30bd4e298795162d3609fd (patch) | |
tree | 9485493e878a383f74cba4a22002aea3c3d2c768 /lib/tasks | |
parent | a635b9da97b0e104b8ac1a846344ec8a4abd3123 (diff) | |
download | gitlab-ce-03836cc5917dd4cc1b30bd4e298795162d3609fd.tar.gz |
fix resque start
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/resque.rake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/tasks/resque.rake b/lib/tasks/resque.rake index 9b30bb0a292..e6987e17639 100644 --- a/lib/tasks/resque.rake +++ b/lib/tasks/resque.rake @@ -1 +1,14 @@ require 'resque/tasks' + +# Fix Exception +# ActiveRecord::StatementInvalid +# Error +# PGError: ERROR: prepared statement "a3" already exists +task "resque:setup" => :environment do + Resque.after_fork do |job| + ActiveRecord::Base.establish_connection + end +end + +desc "Alias for resque:work (To run workers on Heroku)" +task "jobs:work" => "resque:work" |