#com_caiwushuju_code::bj430418
#	['2018-12-31', '2018-09-30', '2018-06-30', '2018-03-31']
import redis


r = redis.Redis(host="114.115.236.206", port=6379, password='clbzzsn',db=3)
f_key = 'com_caiwushuju_code::bj851834'
r.set(f_key,3)
res = r.exists(f_key)
print(res)

# list = ['2023-03-31', '2022-12-31', '2022-09-30', '2022-06-30', '2022-03-31', '2021-12-31', '2021-09-30', '2021-06-30', '2021-03-31', '2020-12-31', '2020-09-30', '2020-06-30', '2020-03-31', '2019-12-31', '2019-09-30', '2019-06-30', '2019-03-31']
#
# for a in list:
#     r.sadd(f_key,a)
# from base.BaseCore import BaseCore
# baseCore  = BaseCore()
# from datetime import datetime,timedelta
# timeNow = baseCore.getNowTime(1)[:10]
# # list_date = []
# #
# # list_date.append(timeNow)
# # print(timeNow)
# # print(list_date)
#
# current_date = datetime.now()
# # 计算昨天的日期
# yesterday = current_date - timedelta(days=1)
# # 格式化昨天的日期
# report_date = yesterday.strftime('%Y-%m-%d')
# # list_date.append(report_date)
# year = int(current_date.strftime('%Y'))
# print(year)
# print(type(year))