Update alicloud.py

pull/122/head
StarsL.cn 2023-11-22 00:57:30 +08:00 committed by GitHub
parent 8afa186eb0
commit e2d463d341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ def exp(account,collect_days,notify_days,notify_amount):
notify_id = hashlib.md5(str(i).encode(encoding='UTF-8')).hexdigest()
endtime = datetime.datetime.strptime(i['EndTime'],'%Y-%m-%dT%H:%M:%SZ') + datetime.timedelta(hours=8)
endtime_str = endtime.strftime('%Y-%m-%d')
logger.debug(f"{i['ProductCode']} {i['InstanceID']}")
iname = consul_svc.get_sid(i['InstanceID'])['instance']['Meta']['name'] if i['ProductCode'] == 'ecs' else 'Null'
exp_dict[i['InstanceID']] = {'Region':i.get('Region','Null'),'Product':i['ProductCode'],
'Name':iname,'EndTime':endtime_str,'notify_id':notify_id,