info key刷新时间调整
This commit is contained in:
parent
b86951650b
commit
f869935aba
@ -11,7 +11,7 @@ import datetime
|
||||
import pdb
|
||||
import json
|
||||
import copy
|
||||
|
||||
import time
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
parser = reqparse.RequestParser()
|
||||
@ -39,6 +39,8 @@ class RelushADinfo(Resource):
|
||||
if need_change_keys:
|
||||
for one in need_change_keys:
|
||||
key = f"adinfo::{one}::info"
|
||||
my_redis.expire(key, 1)
|
||||
time.sleep(1)
|
||||
adid = one.split('_')[0]
|
||||
locationid = one.split('_')[1]
|
||||
areas = self._get_areas(locationid)
|
||||
@ -67,7 +69,6 @@ class RelushADinfo(Resource):
|
||||
return None
|
||||
|
||||
def _get_adinfo(self, id):
|
||||
all = []
|
||||
sql = f"""select
|
||||
id,
|
||||
name,
|
||||
@ -93,7 +94,6 @@ class RelushADinfo(Resource):
|
||||
|
||||
|
||||
data = self.mydb.query(sql)
|
||||
pdb.set_trace()
|
||||
if data:
|
||||
try:
|
||||
line = data[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user