(20241223) Making the tick simulator live for testing.
This commit is contained in:
@@ -82,7 +82,7 @@ import asyncio
|
||||
|
||||
|
||||
# Related to Quart:
|
||||
trading_oauth_callback_bp = Blueprint("trading_cb", __name__)
|
||||
trading_oauth_callback_bp = Blueprint("trading_oauth_cb", __name__)
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
@@ -115,7 +115,12 @@ def init(blueprint_setup_state):
|
||||
|
||||
async def handle_auth_exception():
|
||||
|
||||
print("Hi! Cleaning up...")
|
||||
"""
|
||||
Use this to handle any exceptions that occur in the process of accepting authorization details. Zero's direct
|
||||
library, for instance, raise several exceptions for cases like expired tokens, checksum failures, etc.
|
||||
:return: A web-view that indicates failure.
|
||||
"""
|
||||
|
||||
return await render_template(
|
||||
"/finstitutions/trading/oauth/oauth_failure_v2.html",
|
||||
client = g.client_label,
|
||||
@@ -190,19 +195,6 @@ async def trading_oauth_callback(
|
||||
# ┛┗┗ ┛┣┛┗┛┛┗┛┗
|
||||
# ┛
|
||||
|
||||
# # No valid client:
|
||||
# if success is None: return ResponseModel(
|
||||
# status_code = StatusCodes.FAILED,
|
||||
# http_code = HttpCodes.BAD_REQUEST,
|
||||
# message = f"Invalid/unimplemented client '{trading_client}'."
|
||||
# )
|
||||
#
|
||||
# # When the client was valid:
|
||||
# return ResponseModel(
|
||||
# status_code = StatusCodes.OK if success else StatusCodes.FAILED,
|
||||
# http_code = HttpCodes.SUCCESS if success else HttpCodes.INTERNAL_SERVER_ERROR,
|
||||
# )
|
||||
|
||||
# No valid client:
|
||||
if success is None: return await render_template(
|
||||
"/finstitutions/trading/oauth/oauth_failure_v2.html",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Kill all the scripts:
|
||||
echo "Killing the script."
|
||||
pkill -9 -f "$(pwd)/api/main.py"
|
||||
pkill -9 -f "$(pwd)/wsocket/main.py"
|
||||
pkill -9 -f "$(pwd)/playground/socketio/tick_simulator.py"
|
||||
|
||||
# Get the name of the current directory,
|
||||
# and kill the monitors of the above scripts:
|
||||
|
||||
@@ -338,7 +338,7 @@ if __name__ == "__main__":
|
||||
# Run the web server
|
||||
runner = web.AppRunner(app)
|
||||
await runner.setup()
|
||||
site = web.TCPSite(runner, "0.0.0.0", 5000)
|
||||
site = web.TCPSite(runner, "0.0.0.0", 5214)
|
||||
print("Server running on http://0.0.0.0:5000")
|
||||
await site.start()
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Use this to run the microservice without any docker setup.
|
||||
source .venv/bin/activate
|
||||
python3 "$(pwd)/api/main.py" --host "0.0.0.0" --port 5106 --workers 4 --script-id "kps_cnv_KBC3MoaU" &
|
||||
python3 "$(pwd)/wsocket/main.py" &
|
||||
python3 "$(pwd)/playground/socketio/tick_simulator.py" &
|
||||
deactivate
|
||||
|
||||
# All done:
|
||||
|
||||
Reference in New Issue
Block a user