Commit 9a99ab92 authored by lixiaofang's avatar lixiaofang

del some id

parent 5cc71ca0
......@@ -37,11 +37,6 @@ def kafka_consum(topic_name=None):
for msg_value in msg_dict.values():
for msg in msg_value:
card_info = json.loads(str(msg.value, encoding="utf8"))
if card_info['card_id'] in [719961, 718880, 717122, 720913]:
logging.info("删除重复数据:%s" % card_info['card_id'])
pass
if card_info['card_type'] == "auto_vest":
###在这里去判断一下当前的partition和offset是否已经消费过了 如果已经消费了需要直接去掉数据
bol_consum = judge_offset_partition_have_consum(card_info=card_info, offset=msg.offset,
......
......@@ -362,6 +362,11 @@ def judge_offset_partition_have_consum(card_info=None, offset=0, partition=0):
:return:
"""
try:
if card_info['card_id'] in [719961, 718880, 717122, 720913]:
logging.info("删除重复数据:%s" % card_info['card_id'])
return False
##先判断是不是2019-12-29的
create_time = card_info['create_time']
datetime_create_time = datetime.datetime.strptime(create_time, '%Y-%m-%d %H:%M:%S')
......
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