Skip to content

Commit 34c5f3c

Browse files
committed
include channel param when posting replays to ESDB, for round-robining
1 parent 53f202f commit 34c5f3c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/esdb/replay.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ module ESDB
22
class Replay < ESDB::Resource
33
# POSTs a given replay file to esdb and returns the job ID if it was
44
# successfully queued for processing.
5-
def self.upload(file)
5+
def self.upload(file, channel)
66
replay = self.new
7-
response = JSON.parse(RestClient.post(replay.url, :file => file, :access_token => ESDB.api_key))
7+
response = JSON.parse(RestClient.post(replay.url, :file => file, :access_token => ESDB.api_key, :channel => channel))
88
Rails.logger.info response.inspect
99

1010
response['job'] ? response['job'] : false

lib/gg.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ def method_missing(method, *args)
1010
return self.send('[]=', method.to_s.delete('=').to_sym, *args) if method.match(/=$/)
1111
end
1212
end
13-
13+
1414
def self.config
1515
env = ENV['RACK_ENV'] ? ENV['RACK_ENV'] : (ENV['RAILS_ENV'] ? ENV['RAILS_ENV'] : 'development')
16+
17+
# warning, as of 20121124 this is superceded by ggtracker/config/initializers/esdb.rb
1618
@@config ||= Config.new({
1719
:host => env == 'development' ? 'localhost:9292' : 'alpha.esdb.net'
1820
})

0 commit comments

Comments
 (0)