node节点可配置
This commit is contained in:
parent
c738ebb128
commit
15a7a72c99
2 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ SS_METHOD = 'rc4-md5'
|
|||
MANAGE_BIND_IP = '127.0.0.1'
|
||||
MANAGE_PORT = 3333
|
||||
|
||||
NODE = 'node1'
|
||||
CHECKTIME = 15
|
||||
SYNCTIME = 600
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class DbTransfer(object):
|
|||
update_sql='UPDATE user '+\
|
||||
'set b_usage=b_usage+'+str(dt_transfer[port])+\
|
||||
' where ss_port = '+str(port)
|
||||
insert_sql='insert bandwidth_log value(null,"node1",'+str(port)+','+str(dt_transfer[port])+','+str(int(last_time))+')'
|
||||
insert_sql='insert bandwidth_log value(null,"'+config.NODE+'",'+str(port)+','+str(dt_transfer[port])+','+str(int(last_time))+')'
|
||||
logging.info(update_sql)
|
||||
cur.execute(update_sql)
|
||||
cur.execute(insert_sql)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue