fix
This commit is contained in:
parent
9aa503125f
commit
c5afe12db7
@ -8,7 +8,7 @@ from ops.mmysql import MysqlBase
|
|||||||
import random
|
import random
|
||||||
import requests
|
import requests
|
||||||
import pdb
|
import pdb
|
||||||
define_logger("/data/logs/init_first_ad_channel.log")
|
define_logger("/data/logs/get_news.log")
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
TimeDelay = 60*60
|
TimeDelay = 60*60
|
||||||
|
|
||||||
@ -116,8 +116,8 @@ class InitFirstAD():
|
|||||||
if data:
|
if data:
|
||||||
line = len(data)
|
line = len(data)
|
||||||
nums = int(line * ratio / 100)
|
nums = int(line * ratio / 100)
|
||||||
if ratio != 100:
|
if int(ratio) != int(100):
|
||||||
print(f"all={line} nums={nums}")
|
print(f"all={line} nums={nums} ratio={ratio}")
|
||||||
if nums:
|
if nums:
|
||||||
return random.sample(data, nums)
|
return random.sample(data, nums)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user