Skip to content

Commit 1e0310e

Browse files
authored
修复在通过数据库连接,上传流量使用量时的倍率问题
例如,当节点倍率设置为0.1时,用户A跑了1G流量 修复前:实际使用1G,用户A计费100M,节点使用量增加0.1G 修复后:实际使用1G,用户A计费100M,节点使用量增加1G
1 parent dbc0e29 commit 1e0310e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db_transfer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def update_all_user(self, dt_transfer):
113113
cur.close()
114114

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

118118
if query_sub_in is not None:
119119
query_sub_in += ',%s' % id

0 commit comments

Comments
 (0)