1
This commit is contained in:
parent
4ea8be6c79
commit
f400846138
2
main.py
2
main.py
@ -1,4 +1,4 @@
|
|||||||
# uvicorn main:app --host=127.0.0.1 --port=8030 --reload
|
# uvicorn main:app --host=10.10.3.10 --port=8030 --reload
|
||||||
from pydantic.fields import T
|
from pydantic.fields import T
|
||||||
from config.config import settings
|
from config.config import settings
|
||||||
from fastapi import Depends, FastAPI, BackgroundTasks, Request
|
from fastapi import Depends, FastAPI, BackgroundTasks, Request
|
||||||
|
@ -131,7 +131,7 @@ def set_gameinfo_ext() -> bool:
|
|||||||
url = game_info_url.format(gameid=oldGameId, platformid=platform)
|
url = game_info_url.format(gameid=oldGameId, platformid=platform)
|
||||||
|
|
||||||
data = get_url_data(url=url, timesleep=1).get('data')
|
data = get_url_data(url=url, timesleep=1).get('data')
|
||||||
#print(data)
|
logger.info(f"start get {oldGameId} {platform} game info ext!")
|
||||||
data['oldGameId'] = oldGameId
|
data['oldGameId'] = oldGameId
|
||||||
data['uptime'] = datetime.datetime.strftime(
|
data['uptime'] = datetime.datetime.strftime(
|
||||||
datetime.datetime.now(), "%Y-%m-%d %H:%M:%S")
|
datetime.datetime.now(), "%Y-%m-%d %H:%M:%S")
|
||||||
@ -156,6 +156,7 @@ def set_game_price() -> bool:
|
|||||||
try:
|
try:
|
||||||
oldGameId = line.get("oldGameId", 0)
|
oldGameId = line.get("oldGameId", 0)
|
||||||
platform = line.get("platform", 0)
|
platform = line.get("platform", 0)
|
||||||
|
logger.info(f"start get {oldGameId} {platform} game price!")
|
||||||
url = game_price_url.format(gameid=oldGameId, platformid=platform)
|
url = game_price_url.format(gameid=oldGameId, platformid=platform)
|
||||||
|
|
||||||
data = get_url_data(url).get('data')
|
data = get_url_data(url).get('data')
|
||||||
@ -182,6 +183,7 @@ def set_history_price() -> bool:
|
|||||||
try:
|
try:
|
||||||
oldGameId = line.get("oldGameId", 0)
|
oldGameId = line.get("oldGameId", 0)
|
||||||
platform = line.get("platform", 0)
|
platform = line.get("platform", 0)
|
||||||
|
logger.info(f"start get {oldGameId} {platform} history price!")
|
||||||
url = game_history_price_url.format(gameid=oldGameId,
|
url = game_history_price_url.format(gameid=oldGameId,
|
||||||
platformid=platform)
|
platformid=platform)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user