in solution/tools/aliyun_subscribe_actiontrail/index.py [0:0]
def check_pk(sql):
if connection is None:
# 表示不做幂等验证,直接处理
return None
try:
cursor = connection.cursor()
cursor.execute(sql)
data = cursor.fetchone()
return data
except Exception as e:
logger.error(e)