Skip to content

Commit

Permalink
Merge pull request #117 from zizzic/develop_for_adding_region_lock_de…
Browse files Browse the repository at this point in the history
…fense_code

[fix] defend code for region lock game
  • Loading branch information
mediwind authored Feb 29, 2024
2 parents a1a6b80 + 24672d8 commit eb43364
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions dags/game/game_ccu_to_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def get_ccu():
break
else:
print(f"Failed to get CCU of {game}!")
temp = {"player_count": 0, "result": 0, "game_id": appid}
else:
temp["game_id"] = appid
data.append(temp) # API 응답을 리스트에 추가
Expand Down
16 changes: 10 additions & 6 deletions dags/game/game_price_to_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,18 @@ def get_price():
else:
print(f"Failed to get price of {appid, name}!")

if not temp:
if not temp or not temp[appid]["success"]:
temp = {
appid: {
"success": False,
"data": {
"price_overview": {"final": 999999999, "initial": 999999999}
"success": False,
"data": {
"steam_appid": appid,
"price_overview": {
"final": 999999999,
"initial": 999999999,
"discount_percent": 0,
"final_formatted": "₩ 999,999,999",
},
}
},
}
else:
temp = temp[appid]
Expand Down

0 comments on commit eb43364

Please sign in to comment.