multimodalsim-viewer 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- multimodalsim_viewer/common/__init__.py +0 -0
- multimodalsim_viewer/common/environments/.env +4 -0
- multimodalsim_viewer/common/utils.py +223 -0
- multimodalsim_viewer/server/http_routes.py +135 -125
- multimodalsim_viewer/server/log_manager.py +10 -15
- multimodalsim_viewer/server/scripts.py +106 -32
- multimodalsim_viewer/server/server.py +196 -210
- multimodalsim_viewer/server/simulation.py +167 -154
- multimodalsim_viewer/server/simulation_manager.py +570 -607
- multimodalsim_viewer/server/simulation_visualization_data_collector.py +729 -756
- multimodalsim_viewer/server/simulation_visualization_data_model.py +1552 -1693
- multimodalsim_viewer/ui/angular_app.py +40 -0
- multimodalsim_viewer/ui/static/chunk-6VAXIXEZ.js +7 -0
- multimodalsim_viewer/ui/static/{chunk-MTC2LSCT.js → chunk-IGIP6IOU.js} +1 -1
- multimodalsim_viewer/ui/static/environment.json +7 -0
- multimodalsim_viewer/ui/static/index.html +16 -15
- multimodalsim_viewer/ui/static/{main-X7OVCS3N.js → main-FGMGJ32M.js} +3648 -3648
- multimodalsim_viewer/ui/static/polyfills-FFHMD2TL.js +2 -2
- multimodalsim_viewer/ui/static/scripts/load-environment.script.js +20 -0
- multimodalsim_viewer/ui/static/styles-KU7LTPET.css +1 -1
- multimodalsim_viewer-0.0.2.dist-info/METADATA +70 -0
- multimodalsim_viewer-0.0.2.dist-info/RECORD +41 -0
- {multimodalsim_viewer-0.0.1.dist-info → multimodalsim_viewer-0.0.2.dist-info}/WHEEL +1 -1
- multimodalsim_viewer-0.0.2.dist-info/entry_points.txt +2 -0
- multimodalsim_viewer/server/server_utils.py +0 -129
- multimodalsim_viewer/ui/cli.py +0 -45
- multimodalsim_viewer/ui/server.py +0 -44
- multimodalsim_viewer/ui/static/chunk-U5CGW4P4.js +0 -7
- multimodalsim_viewer-0.0.1.dist-info/METADATA +0 -21
- multimodalsim_viewer-0.0.1.dist-info/RECORD +0 -38
- multimodalsim_viewer-0.0.1.dist-info/entry_points.txt +0 -8
- {multimodalsim_viewer-0.0.1.dist-info → multimodalsim_viewer-0.0.2.dist-info}/top_level.txt +0 -0
@@ -1,25 +1,52 @@
|
|
1
|
-
import
|
1
|
+
import argparse
|
2
2
|
import time
|
3
|
+
import webbrowser
|
3
4
|
|
4
|
-
import
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
8
|
-
from socketio import Client, exceptions
|
5
|
+
from requests import get
|
6
|
+
from requests.exceptions import ConnectionError as RequestsConnectionError
|
7
|
+
from socketio import Client
|
8
|
+
from socketio.exceptions import ConnectionError as SocketIOConnectionError
|
9
9
|
|
10
|
+
from multimodalsim_viewer.common.utils import (
|
11
|
+
CLIENT_PORT,
|
12
|
+
HOST,
|
13
|
+
SERVER_PORT,
|
14
|
+
)
|
15
|
+
from multimodalsim_viewer.server.server import configure_server
|
16
|
+
from multimodalsim_viewer.server.simulation import (
|
17
|
+
configure_simulation_parser,
|
18
|
+
start_simulation_cli,
|
19
|
+
)
|
20
|
+
from multimodalsim_viewer.ui.angular_app import configure_angular_app
|
10
21
|
|
11
|
-
def run_server_and_ui():
|
12
|
-
# Start the server in a separate thread
|
13
|
-
server_thread = threading.Thread(target=run_server)
|
14
|
-
server_thread.start()
|
15
22
|
|
16
|
-
|
17
|
-
|
18
|
-
|
23
|
+
def start(should_start_ui: bool, should_start_server: bool):
|
24
|
+
app = None
|
25
|
+
socketio = None
|
19
26
|
|
20
|
-
|
21
|
-
|
22
|
-
|
27
|
+
if should_start_server:
|
28
|
+
(app, socketio) = configure_server()
|
29
|
+
|
30
|
+
if should_start_ui:
|
31
|
+
app = configure_angular_app(app)
|
32
|
+
|
33
|
+
# Use SERVER_PORT even for the client if the server is running
|
34
|
+
ui_port = SERVER_PORT if should_start_server else CLIENT_PORT
|
35
|
+
if should_start_ui:
|
36
|
+
webbrowser.open(f"http://{HOST}:{ui_port}")
|
37
|
+
|
38
|
+
if socketio is not None:
|
39
|
+
socketio.run(app, host=HOST, port=SERVER_PORT)
|
40
|
+
else:
|
41
|
+
# app should not be None here
|
42
|
+
app.run(host=HOST, port=CLIENT_PORT)
|
43
|
+
|
44
|
+
|
45
|
+
def stop(should_stop_ui: bool, should_stop_server: bool):
|
46
|
+
if should_stop_ui:
|
47
|
+
terminate_ui()
|
48
|
+
if should_stop_server:
|
49
|
+
terminate_server()
|
23
50
|
|
24
51
|
|
25
52
|
def terminate_server():
|
@@ -28,7 +55,7 @@ def terminate_server():
|
|
28
55
|
sio = Client()
|
29
56
|
|
30
57
|
try:
|
31
|
-
sio.connect(f"http://{HOST}:{
|
58
|
+
sio.connect(f"http://{HOST}:{SERVER_PORT}", auth={"type": "script"})
|
32
59
|
|
33
60
|
sio.emit("terminate")
|
34
61
|
|
@@ -38,35 +65,82 @@ def terminate_server():
|
|
38
65
|
|
39
66
|
print("Server terminated")
|
40
67
|
|
41
|
-
except
|
42
|
-
print(
|
43
|
-
|
44
|
-
except Exception as e:
|
45
|
-
print(f"Error: {e}")
|
68
|
+
except SocketIOConnectionError: # pylint: disable=broad-exception-caught
|
69
|
+
print("Server is not running or cannot be reached.")
|
46
70
|
|
47
71
|
|
48
72
|
def terminate_ui():
|
49
73
|
print("Terminating UI...")
|
50
74
|
|
75
|
+
terminated = False
|
76
|
+
|
51
77
|
try:
|
52
|
-
response =
|
78
|
+
response = get(f"http://{HOST}:{CLIENT_PORT}/terminate", timeout=5)
|
53
79
|
|
54
80
|
if response.status_code == 200:
|
55
81
|
print("UI terminated")
|
82
|
+
terminated = True
|
56
83
|
else:
|
57
84
|
print(f"Failed to terminate UI: {response.status_code}")
|
58
85
|
|
59
|
-
except
|
60
|
-
print(
|
86
|
+
except RequestsConnectionError: # pylint: disable=broad-exception-caught
|
87
|
+
print("UI is not running or cannot be reached.")
|
88
|
+
|
89
|
+
if terminated:
|
90
|
+
return
|
91
|
+
|
92
|
+
print("Trying to terminate UI at server port...")
|
93
|
+
try:
|
94
|
+
response = get(f"http://{HOST}:{SERVER_PORT}/terminate", timeout=5)
|
95
|
+
|
96
|
+
if response.status_code == 200:
|
97
|
+
print("UI terminated at server port")
|
98
|
+
else:
|
99
|
+
print(f"Failed to terminate UI at server port: {response.status_code}")
|
100
|
+
|
101
|
+
except RequestsConnectionError:
|
102
|
+
print("UI is not running or cannot be reached at server port.")
|
103
|
+
|
104
|
+
|
105
|
+
def main():
|
106
|
+
"""
|
107
|
+
Main entry point for the multimodal simulation viewer CLI.
|
108
|
+
|
109
|
+
This function sets up the command-line interface using argparse and provides
|
110
|
+
options to run the server, UI, or both, as well as to terminate them.
|
111
|
+
"""
|
112
|
+
|
113
|
+
parser = argparse.ArgumentParser(description="Multimodal Simulation Viewer CLI")
|
114
|
+
|
115
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
116
|
+
|
117
|
+
start_parser = subparsers.add_parser("start", help="Start the server and UI")
|
118
|
+
start_parser.add_argument("--server", action="store_true", help="Start only the server")
|
119
|
+
start_parser.add_argument("--ui", action="store_true", help="Start only the UI")
|
120
|
+
|
121
|
+
stop_parser = subparsers.add_parser("stop", help="Stop the server and UI")
|
122
|
+
stop_parser.add_argument("--ui", action="store_true", help="Stop only the UI")
|
123
|
+
stop_parser.add_argument("--server", action="store_true", help="Stop only the server")
|
124
|
+
|
125
|
+
simulate_parser = subparsers.add_parser("simulate", help="Run a simulation")
|
126
|
+
configure_simulation_parser(simulate_parser)
|
127
|
+
|
128
|
+
# Parse the arguments
|
129
|
+
args = parser.parse_args()
|
61
130
|
|
62
|
-
|
63
|
-
|
131
|
+
if args.command == "start":
|
132
|
+
should_start_ui = args.ui or not args.server
|
133
|
+
should_start_server = args.server or not args.ui
|
134
|
+
start(should_start_ui, should_start_server)
|
64
135
|
|
136
|
+
elif args.command == "stop":
|
137
|
+
should_stop_ui = args.ui or not args.server
|
138
|
+
should_stop_server = args.server or not args.ui
|
139
|
+
stop(should_stop_ui, should_stop_server)
|
65
140
|
|
66
|
-
|
67
|
-
|
141
|
+
elif args.command == "simulate":
|
142
|
+
start_simulation_cli(args)
|
68
143
|
|
69
|
-
terminate_server()
|
70
|
-
terminate_ui()
|
71
144
|
|
72
|
-
|
145
|
+
if __name__ == "__main__":
|
146
|
+
main()
|
@@ -1,210 +1,196 @@
|
|
1
|
-
import logging
|
2
|
-
import time
|
3
|
-
|
4
|
-
from flask import Flask
|
5
|
-
from flask_cors import CORS
|
6
|
-
from flask_socketio import SocketIO, emit, join_room, leave_room
|
7
|
-
|
8
|
-
from multimodalsim_viewer.
|
9
|
-
CLIENT_ROOM,
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
f"
|
56
|
-
"client",
|
57
|
-
)
|
58
|
-
simulation_manager.start_simulation(name, data, response_event, max_duration)
|
59
|
-
|
60
|
-
@socketio.on("stop-simulation")
|
61
|
-
def on_client_stop_simulation(simulation_id):
|
62
|
-
log(f"stopping simulation {simulation_id}", "client")
|
63
|
-
simulation_manager.stop_simulation(simulation_id)
|
64
|
-
|
65
|
-
@socketio.on("pause-simulation")
|
66
|
-
def on_client_pause_simulation(simulation_id):
|
67
|
-
log(f"pausing simulation {simulation_id}", "client")
|
68
|
-
simulation_manager.pause_simulation(simulation_id)
|
69
|
-
|
70
|
-
@socketio.on("resume-simulation")
|
71
|
-
def on_client_resume_simulation(simulation_id):
|
72
|
-
log(f"resuming simulation {simulation_id}", "client")
|
73
|
-
simulation_manager.resume_simulation(simulation_id)
|
74
|
-
|
75
|
-
@socketio.on("get-simulations")
|
76
|
-
def on_client_get_simulations():
|
77
|
-
log("getting simulations", "client")
|
78
|
-
simulation_manager.emit_simulations()
|
79
|
-
|
80
|
-
@socketio.on("get-available-data")
|
81
|
-
def on_client_get_data():
|
82
|
-
log("getting available data", "client")
|
83
|
-
emit("available-data", get_available_data(), to=CLIENT_ROOM)
|
84
|
-
|
85
|
-
@socketio.on("get-missing-simulation-states")
|
86
|
-
def on_client_get_missing_simulation_states(
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
f"
|
91
|
-
"client",
|
92
|
-
)
|
93
|
-
simulation_manager.emit_missing_simulation_states(
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
)
|
135
|
-
|
136
|
-
@socketio.on("simulation-
|
137
|
-
def
|
138
|
-
log(f"simulation {simulation_id}
|
139
|
-
simulation_manager.
|
140
|
-
|
141
|
-
@socketio.on("
|
142
|
-
def
|
143
|
-
log(f"simulation
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
)
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
status,
|
198
|
-
get_session_id(),
|
199
|
-
)
|
200
|
-
|
201
|
-
logging.basicConfig(level=logging.DEBUG)
|
202
|
-
|
203
|
-
log(f"Starting server at {HOST}:{PORT}", "server", should_emit=False)
|
204
|
-
|
205
|
-
# MARK: Run server
|
206
|
-
socketio.run(app, host=HOST, port=PORT)
|
207
|
-
|
208
|
-
|
209
|
-
if __name__ == "__main__":
|
210
|
-
run_server()
|
1
|
+
import logging
|
2
|
+
import time
|
3
|
+
|
4
|
+
from flask import Flask
|
5
|
+
from flask_cors import CORS
|
6
|
+
from flask_socketio import SocketIO, emit, join_room, leave_room
|
7
|
+
|
8
|
+
from multimodalsim_viewer.common.utils import (
|
9
|
+
CLIENT_ROOM,
|
10
|
+
get_available_data,
|
11
|
+
get_session_id,
|
12
|
+
log,
|
13
|
+
)
|
14
|
+
from multimodalsim_viewer.server.http_routes import http_routes
|
15
|
+
from multimodalsim_viewer.server.simulation_manager import SimulationManager
|
16
|
+
|
17
|
+
|
18
|
+
def configure_server() -> tuple[Flask, SocketIO]: # pylint: disable=too-many-statements, too-many-locals
|
19
|
+
app = Flask(__name__)
|
20
|
+
|
21
|
+
# Register HTTP routes
|
22
|
+
CORS(app)
|
23
|
+
app.register_blueprint(http_routes)
|
24
|
+
|
25
|
+
socketio = SocketIO(app, cors_allowed_origins="*")
|
26
|
+
|
27
|
+
# key = session id, value = auth type
|
28
|
+
sockets_types_by_session_id = {}
|
29
|
+
|
30
|
+
simulation_manager = SimulationManager()
|
31
|
+
|
32
|
+
# MARK: Main events
|
33
|
+
@socketio.on("connect")
|
34
|
+
def on_connect(auth):
|
35
|
+
auth_type = auth["type"]
|
36
|
+
log("connected", auth_type)
|
37
|
+
sockets_types_by_session_id[get_session_id()] = auth_type
|
38
|
+
join_room(auth_type)
|
39
|
+
|
40
|
+
@socketio.on("disconnect")
|
41
|
+
def on_disconnect(reason):
|
42
|
+
session_id = get_session_id()
|
43
|
+
auth_type = sockets_types_by_session_id.pop(session_id)
|
44
|
+
log(f"disconnected: {reason}", auth_type)
|
45
|
+
leave_room(auth_type)
|
46
|
+
|
47
|
+
if auth_type == "simulation":
|
48
|
+
simulation_manager.on_simulation_disconnect(session_id)
|
49
|
+
|
50
|
+
# MARK: Client events
|
51
|
+
@socketio.on("start-simulation")
|
52
|
+
def on_client_start_simulation(name, data, response_event, max_duration):
|
53
|
+
log(
|
54
|
+
f"starting simulation {name} with data {data}, "
|
55
|
+
f"response event {response_event} and max duration {max_duration}",
|
56
|
+
"client",
|
57
|
+
)
|
58
|
+
simulation_manager.start_simulation(name, data, response_event, max_duration)
|
59
|
+
|
60
|
+
@socketio.on("stop-simulation")
|
61
|
+
def on_client_stop_simulation(simulation_id):
|
62
|
+
log(f"stopping simulation {simulation_id}", "client")
|
63
|
+
simulation_manager.stop_simulation(simulation_id)
|
64
|
+
|
65
|
+
@socketio.on("pause-simulation")
|
66
|
+
def on_client_pause_simulation(simulation_id):
|
67
|
+
log(f"pausing simulation {simulation_id}", "client")
|
68
|
+
simulation_manager.pause_simulation(simulation_id)
|
69
|
+
|
70
|
+
@socketio.on("resume-simulation")
|
71
|
+
def on_client_resume_simulation(simulation_id):
|
72
|
+
log(f"resuming simulation {simulation_id}", "client")
|
73
|
+
simulation_manager.resume_simulation(simulation_id)
|
74
|
+
|
75
|
+
@socketio.on("get-simulations")
|
76
|
+
def on_client_get_simulations():
|
77
|
+
log("getting simulations", "client")
|
78
|
+
simulation_manager.emit_simulations()
|
79
|
+
|
80
|
+
@socketio.on("get-available-data")
|
81
|
+
def on_client_get_data():
|
82
|
+
log("getting available data", "client")
|
83
|
+
emit("available-data", get_available_data(), to=CLIENT_ROOM)
|
84
|
+
|
85
|
+
@socketio.on("get-missing-simulation-states")
|
86
|
+
def on_client_get_missing_simulation_states(simulation_id, visualization_time, loaded_state_orders):
|
87
|
+
log(
|
88
|
+
f"getting missing simulation states for {simulation_id} "
|
89
|
+
f"with visualization time {visualization_time} "
|
90
|
+
f"and {len(loaded_state_orders)} loaded state orders",
|
91
|
+
"client",
|
92
|
+
)
|
93
|
+
simulation_manager.emit_missing_simulation_states(simulation_id, visualization_time, loaded_state_orders)
|
94
|
+
|
95
|
+
@socketio.on("get-polylines")
|
96
|
+
def on_client_get_polylines(simulation_id):
|
97
|
+
log(f"getting polylines for {simulation_id}", "client")
|
98
|
+
simulation_manager.emit_simulation_polylines(simulation_id)
|
99
|
+
|
100
|
+
@socketio.on("edit-simulation-configuration")
|
101
|
+
def on_client_edit_simulation_configuration(simulation_id, max_duration):
|
102
|
+
log(
|
103
|
+
f"editing simulation {simulation_id} configuration with max duration {max_duration}",
|
104
|
+
"client",
|
105
|
+
)
|
106
|
+
simulation_manager.edit_simulation_configuration(simulation_id, max_duration)
|
107
|
+
|
108
|
+
# MARK: Script events
|
109
|
+
@socketio.on("terminate")
|
110
|
+
def on_script_terminate():
|
111
|
+
log("terminating server", "script")
|
112
|
+
|
113
|
+
for simulation_id, simulation_handler in simulation_manager.simulations.items():
|
114
|
+
if simulation_handler.process is not None:
|
115
|
+
simulation_manager.stop_simulation(simulation_id)
|
116
|
+
simulation_handler.process.join()
|
117
|
+
|
118
|
+
# Wait for all connections to close
|
119
|
+
time.sleep(1)
|
120
|
+
|
121
|
+
socketio.stop()
|
122
|
+
|
123
|
+
print("Server terminated successfully.")
|
124
|
+
|
125
|
+
# MARK: Simulation events
|
126
|
+
@socketio.on("simulation-start")
|
127
|
+
def on_simulation_start(simulation_id, simulation_start_time):
|
128
|
+
log(f"simulation {simulation_id} started", "simulation")
|
129
|
+
simulation_manager.on_simulation_start(simulation_id, get_session_id(), simulation_start_time)
|
130
|
+
|
131
|
+
@socketio.on("simulation-pause")
|
132
|
+
def on_simulation_pause(simulation_id):
|
133
|
+
log(f"simulation {simulation_id} paused", "simulation")
|
134
|
+
simulation_manager.on_simulation_pause(simulation_id)
|
135
|
+
|
136
|
+
@socketio.on("simulation-resume")
|
137
|
+
def on_simulation_resume(simulation_id):
|
138
|
+
log(f"simulation {simulation_id} resumed", "simulation")
|
139
|
+
simulation_manager.on_simulation_resume(simulation_id)
|
140
|
+
|
141
|
+
@socketio.on("log")
|
142
|
+
def on_simulation_log(simulation_id, message):
|
143
|
+
log(f"simulation {simulation_id}: {message}", "simulation", logging.DEBUG)
|
144
|
+
|
145
|
+
@socketio.on("simulation-update-time")
|
146
|
+
def on_simulation_update_time(simulation_id, timestamp):
|
147
|
+
log(
|
148
|
+
f"simulation {simulation_id} time: {timestamp}",
|
149
|
+
"simulation",
|
150
|
+
logging.DEBUG,
|
151
|
+
)
|
152
|
+
simulation_manager.on_simulation_update_time(simulation_id, timestamp)
|
153
|
+
|
154
|
+
@socketio.on("simulation-update-estimated-end-time")
|
155
|
+
def on_simulation_update_estimated_end_time(simulation_id, estimated_end_time):
|
156
|
+
log(
|
157
|
+
f"simulation {simulation_id} estimated end time: {estimated_end_time}",
|
158
|
+
"simulation",
|
159
|
+
logging.DEBUG,
|
160
|
+
)
|
161
|
+
simulation_manager.on_simulation_update_estimated_end_time(simulation_id, estimated_end_time)
|
162
|
+
|
163
|
+
@socketio.on("simulation-update-polylines-version")
|
164
|
+
def on_simulation_update_polylines_version(simulation_id):
|
165
|
+
log(f"simulation {simulation_id} polylines version updated", "simulation")
|
166
|
+
|
167
|
+
simulation_manager.on_simulation_update_polylines_version(simulation_id)
|
168
|
+
|
169
|
+
@socketio.on("simulation-identification")
|
170
|
+
def on_simulation_identification( # pylint: disable=too-many-arguments, too-many-positional-arguments
|
171
|
+
simulation_id,
|
172
|
+
data,
|
173
|
+
simulation_start_time,
|
174
|
+
timestamp,
|
175
|
+
estimated_end_time,
|
176
|
+
max_duration,
|
177
|
+
status,
|
178
|
+
):
|
179
|
+
log(
|
180
|
+
f"simulation {simulation_id} identified with data {data}, "
|
181
|
+
f"simulation start time {simulation_start_time}, timestamp {timestamp}, "
|
182
|
+
f"estimated end time {estimated_end_time}, max duration {max_duration} and status {status}",
|
183
|
+
"simulation",
|
184
|
+
)
|
185
|
+
simulation_manager.on_simulation_identification(
|
186
|
+
simulation_id,
|
187
|
+
data,
|
188
|
+
simulation_start_time,
|
189
|
+
timestamp,
|
190
|
+
estimated_end_time,
|
191
|
+
max_duration,
|
192
|
+
status,
|
193
|
+
get_session_id(),
|
194
|
+
)
|
195
|
+
|
196
|
+
return app, socketio
|