snowglobe 0.4.11__tar.gz → 0.4.12__tar.gz
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.
- {snowglobe-0.4.11/src/snowglobe.egg-info → snowglobe-0.4.12}/PKG-INFO +1 -1
- {snowglobe-0.4.11 → snowglobe-0.4.12}/pyproject.toml +1 -1
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/app.py +15 -3
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/cli.py +5 -1
- {snowglobe-0.4.11 → snowglobe-0.4.12/src/snowglobe.egg-info}/PKG-INFO +1 -1
- {snowglobe-0.4.11 → snowglobe-0.4.12}/LICENSE +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/README.md +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/setup.cfg +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/__init__.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/cli_utils.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/config.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/models.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/project_manager.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/stats.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/telemetry.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe/client/src/utils.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe.egg-info/SOURCES.txt +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe.egg-info/dependency_links.txt +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe.egg-info/entry_points.txt +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe.egg-info/requires.txt +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/src/snowglobe.egg-info/top_level.txt +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/tests/test_app.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/tests/test_cli.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/tests/test_config.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/tests/test_heartbeat.py +0 -0
- {snowglobe-0.4.11 → snowglobe-0.4.12}/tests/test_utils.py +0 -0
@@ -157,7 +157,11 @@ async def process_application_heartbeat(app_id):
|
|
157
157
|
)
|
158
158
|
async def run_completion_fn(completion_request: CompletionRequest):
|
159
159
|
if asyncio.iscoroutinefunction(completion_fn):
|
160
|
-
|
160
|
+
try:
|
161
|
+
asyncio.get_running_loop()
|
162
|
+
response = await completion_fn(completion_request)
|
163
|
+
except RuntimeError:
|
164
|
+
response = asyncio.run(completion_fn(completion_request))
|
161
165
|
else:
|
162
166
|
response = completion_fn(completion_request)
|
163
167
|
return response
|
@@ -250,7 +254,11 @@ async def process_risk_evaluation(test, risk_name, simulation_name, agent_name):
|
|
250
254
|
)
|
251
255
|
async def run_risk_evaluation_fn(risk_evaluation_request: RiskEvaluationRequest):
|
252
256
|
if asyncio.iscoroutinefunction(risks[risk_name]):
|
253
|
-
|
257
|
+
try:
|
258
|
+
asyncio.get_running_loop()
|
259
|
+
risk_evaluation = await risks[risk_name](risk_evaluation_request)
|
260
|
+
except RuntimeError:
|
261
|
+
risk_evaluation = asyncio.run(risks[risk_name](risk_evaluation_request))
|
254
262
|
else:
|
255
263
|
risk_evaluation = risks[risk_name](risk_evaluation_request)
|
256
264
|
return risk_evaluation
|
@@ -312,7 +320,11 @@ async def process_test(test, completion_fn, app_id, simulation_name):
|
|
312
320
|
)
|
313
321
|
async def run_completion_fn(completion_request: CompletionRequest):
|
314
322
|
if asyncio.iscoroutinefunction(completion_fn):
|
315
|
-
|
323
|
+
try:
|
324
|
+
asyncio.get_running_loop()
|
325
|
+
completionOutput = await completion_fn(completion_request)
|
326
|
+
except RuntimeError:
|
327
|
+
completionOutput = asyncio.run(completion_fn(completion_request))
|
316
328
|
else:
|
317
329
|
completionOutput = completion_fn(completion_request)
|
318
330
|
return completionOutput
|
@@ -401,7 +401,11 @@ def test_agent_wrapper(filename: str, app_id: str, app_name: str) -> Tuple[bool,
|
|
401
401
|
)
|
402
402
|
async def run_process_scenario(completion_request: CompletionRequest):
|
403
403
|
if asyncio.iscoroutinefunction(process_scenario):
|
404
|
-
|
404
|
+
try:
|
405
|
+
asyncio.get_running_loop()
|
406
|
+
response = await process_scenario(completion_request)
|
407
|
+
except RuntimeError:
|
408
|
+
response = asyncio.run(process_scenario(completion_request))
|
405
409
|
else:
|
406
410
|
response = process_scenario(completion_request)
|
407
411
|
return response
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|