This commit is contained in:
wuaho 2021-08-14 00:32:03 +08:00
parent baf68b2832
commit 3b3e900930
2 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class Config:
# ck数据库连接
CK_CONFIG = {'host': '139.159.159.3',
'port': 9654,
'send_receive_timeout': 30}
}
# 每个游戏不一样 游戏上报 kafka 主题
SUBSCRIBE_TOPIC = 'xiangsu'

View File

@ -31,6 +31,9 @@ class Transmitter:
if (p['ts'] + p['time_out'] <= ts or buffer_size >= p['bulk_max']) and buffer_size > 0:
p['ts'] = ts
yield tb, buffer
elif p['ts'] + p['time_out'] <= ts:
# 保持连接
self.db_client.execute('select 1')
@staticmethod
def flat_data(data: dict):