summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorAndrey Kumanyaev <me@zzet.org>2012-10-09 00:19:07 +0400
committerAndrey Kumanyaev <me@zzet.org>2012-10-09 00:19:07 +0400
commit03836cc5917dd4cc1b30bd4e298795162d3609fd (patch)
tree9485493e878a383f74cba4a22002aea3c3d2c768 /lib/tasks
parenta635b9da97b0e104b8ac1a846344ec8a4abd3123 (diff)
downloadgitlab-ce-03836cc5917dd4cc1b30bd4e298795162d3609fd.tar.gz
fix resque start
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/resque.rake13
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"