争霸测试
This commit is contained in:
parent
4f66ebbe64
commit
d4a0e5dcfc
1
create_database.sql
Normal file
1
create_database.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
create database zhengba;
|
@ -6,7 +6,7 @@ class Config:
|
|||||||
'send_receive_timeout': 30}
|
'send_receive_timeout': 30}
|
||||||
|
|
||||||
# 每个游戏不一样 游戏上报 kafka 主题
|
# 每个游戏不一样 游戏上报 kafka 主题
|
||||||
SUBSCRIBE_TOPIC = 'test2'
|
SUBSCRIBE_TOPIC = 'zhengba_test'
|
||||||
|
|
||||||
KAFKA_CONSUMER_CONF = {
|
KAFKA_CONSUMER_CONF = {
|
||||||
'bootstrap_servers': ["192.168.0.30:9092", "192.168.0.71:9092", "192.168.0.229:9092"],
|
'bootstrap_servers': ["192.168.0.30:9092", "192.168.0.71:9092", "192.168.0.229:9092"],
|
||||||
@ -14,10 +14,10 @@ class Config:
|
|||||||
'auto_offset_reset': 'earliest',
|
'auto_offset_reset': 'earliest',
|
||||||
|
|
||||||
# 每个游戏不一样
|
# 每个游戏不一样
|
||||||
'group_id': 'legu_group3'
|
'group_id': 'zhengba_consumer_group'
|
||||||
}
|
}
|
||||||
# 游戏数据库名
|
# 游戏数据库名
|
||||||
GAME = 'shjy'
|
GAME = 'zhengba'
|
||||||
|
|
||||||
REDIS_CONF = {
|
REDIS_CONF = {
|
||||||
'host': '192.168.0.161',
|
'host': '192.168.0.161',
|
||||||
|
@ -31,7 +31,7 @@ def run():
|
|||||||
for topic, msg in consumer():
|
for topic, msg in consumer():
|
||||||
# print(msg)
|
# print(msg)
|
||||||
type_ = msg['#type']
|
type_ = msg['#type']
|
||||||
if msg['#app_id']!='c3e0409ac18341149877b08f087db640':
|
if msg['#app_id']!='e903ab24ad8f4bfca8a3ce7e122cd102':
|
||||||
print(msg)
|
print(msg)
|
||||||
del msg['#type']
|
del msg['#type']
|
||||||
ts = int(time.time())
|
ts = int(time.time())
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
create view shjy.user_view as select *
|
create view zhengba.user_view as select *
|
||||||
from shjy.user
|
from zhengba.user
|
||||||
order by `#reg_time` desc
|
order by `#reg_time` desc
|
||||||
LIMIT 1 by `#account_id`
|
LIMIT 1 by `#account_id`
|
@ -17,6 +17,8 @@ def create_consumer(partition=-1):
|
|||||||
# print(msg)
|
# print(msg)
|
||||||
topic = msg.topic
|
topic = msg.topic
|
||||||
val = msg.value
|
val = msg.value
|
||||||
|
if val.get('owner_name') not in ('gmhdgdt', 'gmhdtt'):
|
||||||
|
continue
|
||||||
yield topic, val
|
yield topic, val
|
||||||
|
|
||||||
return consumer
|
return consumer
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
create table shjy.event
|
create table zhengba.event
|
||||||
(
|
(
|
||||||
`#ip` Nullable(IPv4),
|
`#ip` Nullable(IPv4),
|
||||||
`#country` Nullable(String),
|
`#country` Nullable(String),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
create table shjy.user
|
create table zhengba.user
|
||||||
(
|
(
|
||||||
|
|
||||||
`#reg_time` DateTime('UTC'),
|
`#reg_time` DateTime('UTC'),
|
||||||
|
Loading…
Reference in New Issue
Block a user