Skip to content

Commit

Permalink
修复在通过数据库连接,上传流量使用量时的倍率问题
Browse files Browse the repository at this point in the history
例如,当节点倍率设置为0.1时,用户A跑了1G流量
修复前:实际使用1G,用户A计费100M,节点使用量增加0.1G
修复后:实际使用1G,用户A计费100M,节点使用量增加1G
  • Loading branch information
eeeeLeeee authored Nov 27, 2018
1 parent dbc0e29 commit 1e0310e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def update_all_user(self, dt_transfer):
cur.close()

bandwidth_thistime = bandwidth_thistime + \
((dt_transfer[id][0] + dt_transfer[id][1]) * self.traffic_rate)
(dt_transfer[id][0] + dt_transfer[id][1])

if query_sub_in is not None:
query_sub_in += ',%s' % id
Expand Down

0 comments on commit 1e0310e

Please sign in to comment.