From f6d781c248b92ce5ee122f821254e9f111219209 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 2 May 2013 19:48:23 +0200 Subject: [PATCH] Enable octopus --- lib/travis/api/app.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/travis/api/app.rb b/lib/travis/api/app.rb index 6ac37eed..6cf214f2 100644 --- a/lib/travis/api/app.rb +++ b/lib/travis/api/app.rb @@ -121,8 +121,15 @@ module Travis::Api Travis::Database.connect if Travis.env == 'production' || Travis.env == 'staging' - puts "is octopus working? #{::Octopus.enabled?}" + # Octopus checks for Rails.env, just hardcode enabled? + Octopus.instance_eval do + def enabled? + true + end + end + ActiveRecord::Base.custom_octopus_connection = false + ::Octopus.setup do |config| config.shards = { :follower => Travis.config.database_follower } config.environments = ['production', 'staging']