Commit b3cf9c5e authored by 任婷婷's avatar 任婷婷

.

parent 5ef47857
...@@ -153,7 +153,13 @@ def update_tag3_user_portrait(cl_id): ...@@ -153,7 +153,13 @@ def update_tag3_user_portrait(cl_id):
def consume_kafka(): def consume_kafka():
sql = "select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))" sql = "select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
print('*'*100)
print('consume kafka before jerry')
db, cursor = get_jerry_test() db, cursor = get_jerry_test()
print('connection stauts 1:', db.open)
db.close()
db.ping(reconnect=True)
print('connection stauts 2:', db.open)
cursor.execute(sql) cursor.execute(sql)
device_ids_lst = [i[0] for i in cursor.fetchall()] device_ids_lst = [i[0] for i in cursor.fetchall()]
db.close() db.close()
......
...@@ -362,11 +362,6 @@ def get_jerry_test(): ...@@ -362,11 +362,6 @@ def get_jerry_test():
passwd="aqpuBLYzEV7tML5RPsN1pntUzFy", passwd="aqpuBLYzEV7tML5RPsN1pntUzFy",
db="jerry_test", db="jerry_test",
charset="utf8") charset="utf8")
print('connection stauts 1:', db.open)
db.close()
db.ping(reconnect=True)
print('connection stauts 2:', db.open)
return db, db.cursor() return db, db.cursor()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment