mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-04-26 00:10:28 -05:00
Fixed thread exit.
This commit is contained in:
parent
fa9ee4eb13
commit
c9ecfcb321
|
|
@ -11,6 +11,7 @@ import yaml
|
||||||
import graypy
|
import graypy
|
||||||
import requests
|
import requests
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
from logic.mongodb_handler import user_db_handler
|
from logic.mongodb_handler import user_db_handler
|
||||||
from logic.time_handler import get_time
|
from logic.time_handler import get_time
|
||||||
|
|
@ -176,7 +177,6 @@ def steam_login():
|
||||||
# Read: Doc -> AUTH
|
# Read: Doc -> AUTH
|
||||||
# You can copy and paste the JSON from the Auth Doc here. If you don't have a steam api key.
|
# You can copy and paste the JSON from the Auth Doc here. If you don't have a steam api key.
|
||||||
# The Client does not validate this and just uses it.
|
# The Client does not validate this and just uses it.
|
||||||
# Game id = 555440
|
|
||||||
return jsonify({"preferredLanguage": "en", "friendsFirstSync": {"steam": True},"fixedMyFriendsUserPlatformId":
|
return jsonify({"preferredLanguage": "en", "friendsFirstSync": {"steam": True},"fixedMyFriendsUserPlatformId":
|
||||||
{"steam": True}, "id": userid, "provider": {"providerId": steamid, "providerName": "steam", "userId":
|
{"steam": True}, "id": userid, "provider": {"providerId": steamid, "providerName": "steam", "userId":
|
||||||
userid}, "providers": [{"providerName": "steam", "providerId": steamid}], "friends": [], "triggerResults":
|
userid}, "providers": [{"providerName": "steam", "providerId": steamid}], "friends": [], "triggerResults":
|
||||||
|
|
@ -301,9 +301,14 @@ def run():
|
||||||
|
|
||||||
|
|
||||||
def keep_alive():
|
def keep_alive():
|
||||||
t = Thread(target=run)
|
try:
|
||||||
|
t = Thread(target=run)
|
||||||
t.start()
|
t.daemon = True
|
||||||
|
t.start()
|
||||||
|
while True:
|
||||||
|
time.sleep(100)
|
||||||
|
except (KeyboardInterrupt, SystemExit):
|
||||||
|
print('Received keyboard interrupt, quitting threads.')
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------- #
|
# ------------------------------------------------------- #
|
||||||
|
|
@ -323,5 +328,3 @@ mongo_collection = config['mongodb']['collection']
|
||||||
# ------------------------------------------------------- #
|
# ------------------------------------------------------- #
|
||||||
setup_graylog()
|
setup_graylog()
|
||||||
keep_alive()
|
keep_alive()
|
||||||
print("Exiting...")
|
|
||||||
exit(0)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user