diff --git a/app/services/aggregation_client.rb b/app/services/aggregation_client.rb index afe19be3e..6690a918e 100644 --- a/app/services/aggregation_client.rb +++ b/app/services/aggregation_client.rb @@ -8,8 +8,8 @@ class ServerError < ConnectionError; end attr_reader :connection def initialize(adapter=Faraday.default_adapter) + @host = ENV.fetch('AGGREGATION_HOST', 'https://aggregation-staging.zooniverse.org') @connection = connect!(adapter) - @host ||= ENV.fetch('AGGREGATION_HOST', 'http://test.example.com') end def connect!(adapter) @@ -24,7 +24,7 @@ def send_aggregation_request(project_id, workflow_id, user_id) params = { project_id: project_id, workflow_id: workflow_id, user_id: user_id } request(:post, '/run_aggregation') do |req| - req.body = params.to_json + req.body = params end end diff --git a/kubernetes/deployment-production.tmpl b/kubernetes/deployment-production.tmpl index da6439a50..5c39f42e0 100644 --- a/kubernetes/deployment-production.tmpl +++ b/kubernetes/deployment-production.tmpl @@ -120,6 +120,7 @@ data: TALK_API_USER: '1' TALK_API_APPLICATION: '1' USER_SUBJECT_LIMIT: '10000' + AGGREGATION_HOST: http://aggregation-caesar/ --- apiVersion: apps/v1 kind: Deployment diff --git a/kubernetes/deployment-staging.tmpl b/kubernetes/deployment-staging.tmpl index 8ae7e3bbd..4cf3ebd90 100644 --- a/kubernetes/deployment-staging.tmpl +++ b/kubernetes/deployment-staging.tmpl @@ -109,6 +109,7 @@ data: TALK_API_USER: '1' TALK_API_APPLICATION: '1' USER_SUBJECT_LIMIT: '100' + AGGREGATION_HOST: http://aggregation-staging-app/ --- apiVersion: apps/v1 kind: Deployment