Skip to content

Commit e2faaf3

Browse files
author
Fatih Arslan
committed
koding-worker: fix slow producer problem when updating
1 parent e810365 commit e2faaf3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Cakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ task 'goBroker', "Run the goBroker", (options)->
308308
enabled : if config.runKontrol is yes then yes else no
309309
binary : uuid
310310
port : broker.port
311+
hostname : options.domain
311312
verbose : yes
312313

313314
task 'goBrokerKite', "Run the goBrokerKite", (options)->
@@ -327,6 +328,7 @@ task 'goBrokerKite', "Run the goBrokerKite", (options)->
327328
enabled : if config.runKontrol is yes then yes else no
328329
binary : uuid
329330
port : broker.port
331+
hostname : options.domain
330332
verbose : yes
331333

332334
task 'premiumBrokerKite', "Run the premium broker kite", (options)->
@@ -346,6 +348,7 @@ task 'premiumBrokerKite', "Run the premium broker kite", (options)->
346348
enabled : if config.runKontrol is yes then yes else no
347349
binary : uuid
348350
port : broker.port
351+
hostname : options.domain
349352
verbose : yes
350353

351354
task 'rerouting', "Run rerouting", (options)->

node_modules_koding/koding-worker/main.coffee

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Worker extends EventEmitter
5050
command : options.command
5151
option : options.option
5252
uuid : options.uuid
53-
hostname : @getHostName()
53+
hostname : options.hostname
5454
timestamp : @isoDateString()
5555
pid : options.pid
5656
status : options.status
@@ -97,9 +97,6 @@ class Worker extends EventEmitter
9797
getRabbitKey:() ->
9898
version = (fs.readFileSync nodePath.join(__dirname, '../../KEY'), 'utf-8').trim()
9999

100-
getHostName:() ->
101-
hostName = os.hostname()
102-
103100
handleMessage:(message, headers, deliveryInfo)=>
104101
messageData = JSON.parse message.data.toString("utf-8")
105102
unless messageData.name?

0 commit comments

Comments
 (0)