Created
April 2, 2012 14:38
-
-
Save moskvin/2283919 to your computer and use it in GitHub Desktop.
Fix for postgres connection via redis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------- app/workers/post_receive.rb ------------------------- | |
index 28216ec..39ead22 100644 | |
@@ -2,6 +2,9 @@ class PostReceive | |
@queue = :post_receive | |
def self.perform(reponame, oldrev, newrev, ref, author_key_id) | |
+ | |
+ defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection | |
+ | |
project = Project.find_by_path(reponame) | |
return false if project.nil? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment