update
This commit is contained in:
parent
5a95271bb8
commit
50db2df586
@ -11,6 +11,8 @@ async def change_ecs_name(ns={}):
|
||||
"EcsId": ns.get("EcsId"),
|
||||
"Name": ns.get("Name")
|
||||
}
|
||||
print(body)
|
||||
print(get_signature(action, method, ecs_url, param))
|
||||
url = get_signature(action, method, ecs_url, param)
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.request(method, url, json=body) as response:
|
||||
|
||||
@ -6,6 +6,10 @@ async def delete_eip(ns={}):
|
||||
param = {}
|
||||
url = get_signature(action, method, NETWORK_URL, param=param)
|
||||
body = {'EIPId': ns.get('EIPId')}
|
||||
|
||||
print(body)
|
||||
print(url)
|
||||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.request(method, url, json=body) as response:
|
||||
resp = await response.text()
|
||||
|
||||
@ -2,6 +2,12 @@ async def addinvitecode(ns):
|
||||
"""
|
||||
生成邀请码
|
||||
"""
|
||||
import datetime
|
||||
|
||||
now = datetime.datetime.now()
|
||||
start_of_day = now.replace(hour=0, minute=0, second=0, microsecond=0)
|
||||
end_of_day = now.replace(hour=23, minute=59, second=59, microsecond=999999)
|
||||
|
||||
db = DBPools()
|
||||
async with db.sqlorContext('kboss') as sor:
|
||||
if ns['promotingid'] and ns['iusserid']:
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
async def get_customer_mailcode(ns):
|
||||
|
||||
import datetime
|
||||
now = datetime.datetime.now()
|
||||
|
||||
if now.hour < 10:
|
||||
print('now.hour < 10')
|
||||
|
||||
db = DBPools()
|
||||
async with db.sqlorContext('kboss') as sor:
|
||||
user = await sor.R('users', {'id': ns.get('user_id')})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user