add video hash
This commit is contained in:
parent
3c4e78e6b7
commit
9068506927
1 changed files with 2 additions and 0 deletions
|
@ -75,6 +75,8 @@ end
|
||||||
|
|
||||||
function _M.balance(self)
|
function _M.balance(self)
|
||||||
local key = util.generate_var_value(self.hash_by)
|
local key = util.generate_var_value(self.hash_by)
|
||||||
|
if key == "":
|
||||||
|
key = str(random.randint(0, 1000000))
|
||||||
local subset_id = self.instance:find(key)
|
local subset_id = self.instance:find(key)
|
||||||
local endpoints = self.subsets[subset_id]
|
local endpoints = self.subsets[subset_id]
|
||||||
local endpoint = endpoints[math.random(#endpoints)]
|
local endpoint = endpoints[math.random(#endpoints)]
|
||||||
|
|
Loading…
Reference in a new issue