proxysqlweightlifter 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d20c202dbb5e6fd963e4d5b58f52a4ac7766bfcd43009e79cbf8b10b0dc7272e
4
- data.tar.gz: bb9faa6666c5babf550175365aae062fd11d9e5853596039cdd4a2fd7354a300
3
+ metadata.gz: 44e019ac02ead46caa2a86932d0f9856473d46ad50583a62b38a8b04cd9e5c34
4
+ data.tar.gz: cc28d7d780b6d25549c175263b660a27d0bbd723516845891cfaece99a6193f6
5
5
  SHA512:
6
- metadata.gz: f05d6b3a374739a7aa845f1c5b7ce778fb1dc8dd3e125b6a7e79d79133a83328c211002b844f5213a73127e9ac76e4a6f21c319348df4e694bd97836201a47e0
7
- data.tar.gz: e762f7d8f221ce83d08215f391952dc494489ea1fad5136d78033b793bd012ab2cfd7dd965d88c84b5b9eb225d266b84a27d07a2b6e357aa51c881984e43f246
6
+ metadata.gz: 54c77685883e559485b555a32e162bfe349db6cdc8585aba386f5593408a0e79adb1b4ba28eaffc0e8fd2b4fb70e6999fe006c310e26e628788b8170ddfe5013
7
+ data.tar.gz: a8300af740e7c9bf49be3eceb0601e0a69f2f4024568b8ca900eb5c6e8b5fd080ff8d93b4fa894e2bd8f4c89798bfea246097b61e84f16441995a58b3aa0a378
@@ -80,7 +80,7 @@ module Proxysqlweightlifter
80
80
  end
81
81
 
82
82
  def update_weight(hostname:, port:, hostgroup_id:)
83
- weight = hostgroup_weights[hostgroup_id] || default_weight || 1
83
+ weight = hostgroup_weights[hostgroup_id] || hostgroup_weights[hostgroup_id.to_i] || default_weight || 1
84
84
  db.query(%(
85
85
  UPDATE mysql_servers
86
86
  SET weight = #{weight}
@@ -1,3 +1,3 @@
1
1
  module Proxysqlweightlifter
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxysqlweightlifter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernestas Poskus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-21 00:00:00.000000000 Z
11
+ date: 2019-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2