summaryrefslogtreecommitdiff
path: root/app/models/gs_cluster_sync_log_entry.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:01:16 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:01:16 +0100
commitddb3dfa92ec0878240211cb2b7a8e125961b1360 (patch)
tree0111ac9f589d97503046d9a81cd3af841e17501d /app/models/gs_cluster_sync_log_entry.rb
parente76890d5f4634d47514a592d501d9792ae2ff7bb (diff)
Moved to GsParemeter.get and set defaults for a couple of validations.
Diffstat (limited to 'app/models/gs_cluster_sync_log_entry.rb')
-rw-r--r--app/models/gs_cluster_sync_log_entry.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/gs_cluster_sync_log_entry.rb b/app/models/gs_cluster_sync_log_entry.rb
index 063ff23..51e3b05 100644
--- a/app/models/gs_cluster_sync_log_entry.rb
+++ b/app/models/gs_cluster_sync_log_entry.rb
@@ -15,7 +15,7 @@ class GsClusterSyncLogEntry < ActiveRecord::Base
after_create :apply_to_local_database
def apply_to_local_database
- if self.homebase_ip_address != HOMEBASE_IP_ADDRESS
+ if self.homebase_ip_address != GsParameter.get('HOMEBASE_IP_ADDRESS')
if self.class_name.constantize.new.attribute_names.include?('is_native')
case self.action
when 'create'
@@ -84,7 +84,7 @@ class GsClusterSyncLogEntry < ActiveRecord::Base
end
def populate_other_cluster_nodes
- if self.homebase_ip_address == HOMEBASE_IP_ADDRESS && self.waiting_to_be_synced == true
+ if self.homebase_ip_address == GsParameter.get('HOMEBASE_IP_ADDRESS') && self.waiting_to_be_synced == true
if GsNode.where(:push_updates_to => true).count > 0
GsNode.where(:push_updates_to => true).each do |gs_node|
RemoteGsNode::GsClusterSyncLogEntry.site = gs_node.site