1
This commit is contained in:
parent
402def6734
commit
8f1ba1040b
13
sync_event_name.py
Normal file
13
sync_event_name.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import redis
|
||||||
|
from clickhouse_driver import Client
|
||||||
|
|
||||||
|
from settings import settings
|
||||||
|
|
||||||
|
rdb = redis.Redis(**settings.REDIS_CONF)
|
||||||
|
|
||||||
|
client = Client(**settings.CK_CONFIG)
|
||||||
|
|
||||||
|
sql = f"""select distinct `#event_name` as v from {settings.GAME}.event"""
|
||||||
|
df = client.query_dataframe(sql)
|
||||||
|
data = df['v'].to_list()
|
||||||
|
rdb.sadd(f'{settings.GAME}_event_set', *data)
|
Loading…
Reference in New Issue
Block a user