simstack 2.0.1__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.
- simstack/__init__.py +0 -0
- simstack/_version.py +24 -0
- simstack/core/__init__.py +0 -0
- simstack/core/artifacts.py +406 -0
- simstack/core/asnyc_helper.py +14 -0
- simstack/core/config_file.py +60 -0
- simstack/core/context.py +283 -0
- simstack/core/definitions.py +22 -0
- simstack/core/engine.py +115 -0
- simstack/core/find_simstack_modules.py +41 -0
- simstack/core/hash.py +179 -0
- simstack/core/node.py +1137 -0
- simstack/core/node_claim.py +31 -0
- simstack/core/node_runner.py +362 -0
- simstack/core/process_results.py +102 -0
- simstack/core/recompute_artifacts.py +117 -0
- simstack/core/reset_db.py +12 -0
- simstack/core/resource_assignment.py +222 -0
- simstack/core/resources.py +90 -0
- simstack/core/route_table.py +24 -0
- simstack/core/run_docker.py +109 -0
- simstack/core/run_node.py +71 -0
- simstack/core/runner.py +169 -0
- simstack/core/services/__init__.py +11 -0
- simstack/core/services/base_service.py +191 -0
- simstack/core/services/file_transfer_service.py +117 -0
- simstack/core/services/git_restart_service.py +12 -0
- simstack/core/services/git_uv_update_service.py +105 -0
- simstack/core/services/node_execution_service.py +182 -0
- simstack/core/services/resource_branch_monitor_service.py +71 -0
- simstack/core/services/runner_cleanup_service.py +149 -0
- simstack/core/services/runner_manager.py +163 -0
- simstack/core/services/runner_status_service.py +10 -0
- simstack/core/services/slurm_status_service.py +67 -0
- simstack/core/services/stop_check_service.py +27 -0
- simstack/core/services/timeout_restart_service.py +26 -0
- simstack/core/simstack_result.py +39 -0
- simstack/core/submit_node.py +217 -0
- simstack/core/task_id.py +22 -0
- simstack/methods/__init__.py +0 -0
- simstack/methods/archive_files.py +292 -0
- simstack/methods/fire_and_forget_runner.py +113 -0
- simstack/methods/generate_test.py +125 -0
- simstack/methods/get_file.py +26 -0
- simstack/methods/mass_runner.py +154 -0
- simstack/methods/multiple_executor.py +307 -0
- simstack/methods/switch_git.py +16 -0
- simstack/methods/upload_helpers.py +81 -0
- simstack/models/__init__.py +74 -0
- simstack/models/array_list.py +21 -0
- simstack/models/array_storage.py +83 -0
- simstack/models/artifact_models.py +127 -0
- simstack/models/base_lists.py +51 -0
- simstack/models/base_types.py +209 -0
- simstack/models/charts_artifact.py +690 -0
- simstack/models/dataset.py +451 -0
- simstack/models/dataset_metadata.py +390 -0
- simstack/models/datasettuple.py +587 -0
- simstack/models/file_instance.py +150 -0
- simstack/models/file_list.py +45 -0
- simstack/models/files.py +424 -0
- simstack/models/fire_and_forget_result.py +19 -0
- simstack/models/images2d.py +113 -0
- simstack/models/log_entry_model.py +37 -0
- simstack/models/models.py +52 -0
- simstack/models/named_data_reference.py +36 -0
- simstack/models/node_registry.py +96 -0
- simstack/models/pandas_model.py +239 -0
- simstack/models/parameters.py +402 -0
- simstack/models/pickle_models.py +300 -0
- simstack/models/project.py +13 -0
- simstack/models/resource_assignment.py +170 -0
- simstack/models/resource_definition.py +125 -0
- simstack/models/runner_model.py +39 -0
- simstack/models/simple_table.py +79 -0
- simstack/models/simstack_model.py +97 -0
- simstack/models/slurm_info.py +17 -0
- simstack/models/table_artifact.py +87 -0
- simstack/models/tag.py +12 -0
- simstack/models/unused_test_file.py +5 -0
- simstack/simstack_marker.com +1 -0
- simstack/static/docs/.buildinfo +4 -0
- simstack/static/docs/_images/GUI Concept.webp +0 -0
- simstack/static/docs/_modules/index.html +434 -0
- simstack/static/docs/_modules/simstack/core/artifacts.html +743 -0
- simstack/static/docs/_modules/simstack/core/asnyc_helper.html +330 -0
- simstack/static/docs/_modules/simstack/core/config_file.html +379 -0
- simstack/static/docs/_modules/simstack/core/definitions.html +341 -0
- simstack/static/docs/_modules/simstack/core/engine.html +437 -0
- simstack/static/docs/_modules/simstack/core/find_simstack_modules.html +360 -0
- simstack/static/docs/_modules/simstack/core/hash.html +528 -0
- simstack/static/docs/_modules/simstack/core/node.html +1392 -0
- simstack/static/docs/_modules/simstack/core/node_claim.html +347 -0
- simstack/static/docs/_modules/simstack/core/node_runner.html +711 -0
- simstack/static/docs/_modules/simstack/core/process_results.html +418 -0
- simstack/static/docs/_modules/simstack/core/recompute_artifacts.html +433 -0
- simstack/static/docs/_modules/simstack/core/reset_db.html +328 -0
- simstack/static/docs/_modules/simstack/core/resource_assignment.html +553 -0
- simstack/static/docs/_modules/simstack/core/resources.html +424 -0
- simstack/static/docs/_modules/simstack/core/route_table.html +349 -0
- simstack/static/docs/_modules/simstack/core/run_docker.html +425 -0
- simstack/static/docs/_modules/simstack/core/run_node.html +390 -0
- simstack/static/docs/_modules/simstack/core/runner.html +491 -0
- simstack/static/docs/_modules/simstack/core/services/base_service.html +522 -0
- simstack/static/docs/_modules/simstack/core/services/file_transfer_service.html +436 -0
- simstack/static/docs/_modules/simstack/core/services/git_restart_service.html +331 -0
- simstack/static/docs/_modules/simstack/core/services/git_uv_update_service.html +427 -0
- simstack/static/docs/_modules/simstack/core/services/node_execution_service.html +507 -0
- simstack/static/docs/_modules/simstack/core/services/resource_branch_monitor_service.html +390 -0
- simstack/static/docs/_modules/simstack/core/services/runner_cleanup_service.html +468 -0
- simstack/static/docs/_modules/simstack/core/services/runner_manager.html +485 -0
- simstack/static/docs/_modules/simstack/core/services/runner_status_service.html +329 -0
- simstack/static/docs/_modules/simstack/core/services/slurm_status_service.html +386 -0
- simstack/static/docs/_modules/simstack/core/services/stop_check_service.html +346 -0
- simstack/static/docs/_modules/simstack/core/services/timeout_restart_service.html +345 -0
- simstack/static/docs/_modules/simstack/core/simstack_result.html +355 -0
- simstack/static/docs/_modules/simstack/core/submit_node.html +536 -0
- simstack/static/docs/_modules/simstack/core/task_id.html +344 -0
- simstack/static/docs/_modules/simstack/methods/archive_files.html +598 -0
- simstack/static/docs/_modules/simstack/methods/fire_and_forget_runner.html +432 -0
- simstack/static/docs/_modules/simstack/methods/generate_test.html +443 -0
- simstack/static/docs/_modules/simstack/methods/get_file.html +342 -0
- simstack/static/docs/_modules/simstack/methods/mass_runner.html +476 -0
- simstack/static/docs/_modules/simstack/methods/multiple_executor.html +674 -0
- simstack/static/docs/_modules/simstack/methods/switch_git.html +332 -0
- simstack/static/docs/_modules/simstack/methods/upload_helpers.html +403 -0
- simstack/static/docs/_modules/simstack/models/array_list.html +337 -0
- simstack/static/docs/_modules/simstack/models/array_storage.html +417 -0
- simstack/static/docs/_modules/simstack/models/base_lists.html +374 -0
- simstack/static/docs/_modules/simstack/models/base_types.html +588 -0
- simstack/static/docs/_modules/simstack/models/charts_artifact.html +1035 -0
- simstack/static/docs/_modules/simstack/models/dataset.html +866 -0
- simstack/static/docs/_modules/simstack/models/dataset_metadata.html +711 -0
- simstack/static/docs/_modules/simstack/models/datasettuple.html +1005 -0
- simstack/static/docs/_modules/simstack/models/file_instance.html +472 -0
- simstack/static/docs/_modules/simstack/models/file_list.html +367 -0
- simstack/static/docs/_modules/simstack/models/files.html +773 -0
- simstack/static/docs/_modules/simstack/models/fire_and_forget_result.html +335 -0
- simstack/static/docs/_modules/simstack/models/images2d.html +447 -0
- simstack/static/docs/_modules/simstack/models/log_entry_model.html +356 -0
- simstack/static/docs/_modules/simstack/models/models.html +374 -0
- simstack/static/docs/_modules/simstack/models/named_data_reference.html +355 -0
- simstack/static/docs/_modules/simstack/models/node_registry.html +415 -0
- simstack/static/docs/_modules/simstack/models/pandas_model.html +570 -0
- simstack/static/docs/_modules/simstack/models/parameters.html +739 -0
- simstack/static/docs/_modules/simstack/models/pickle_models.html +631 -0
- simstack/static/docs/_modules/simstack/models/project.html +329 -0
- simstack/static/docs/_modules/simstack/models/resource_assignment.html +501 -0
- simstack/static/docs/_modules/simstack/models/resource_definition.html +477 -0
- simstack/static/docs/_modules/simstack/models/runner_model.html +361 -0
- simstack/static/docs/_modules/simstack/models/simple_table.html +413 -0
- simstack/static/docs/_modules/simstack/models/simstack_model.html +416 -0
- simstack/static/docs/_modules/simstack/models/slurm_info.html +333 -0
- simstack/static/docs/_modules/simstack/models/table_artifact.html +406 -0
- simstack/static/docs/_modules/simstack/models/tag.html +328 -0
- simstack/static/docs/_modules/simstack/tables/model_table.html +519 -0
- simstack/static/docs/_modules/simstack/tables/node_children.html +538 -0
- simstack/static/docs/_modules/simstack/tables/node_table.html +854 -0
- simstack/static/docs/_modules/simstack/tables/table_builder.html +642 -0
- simstack/static/docs/_modules/simstack/util/async_zip_utils.html +337 -0
- simstack/static/docs/_modules/simstack/util/b64mixin.html +339 -0
- simstack/static/docs/_modules/simstack/util/cleaned_json_schema.html +336 -0
- simstack/static/docs/_modules/simstack/util/config_reader.html +498 -0
- simstack/static/docs/_modules/simstack/util/custom_model_dump.html +391 -0
- simstack/static/docs/_modules/simstack/util/database_information.html +488 -0
- simstack/static/docs/_modules/simstack/util/db.html +1392 -0
- simstack/static/docs/_modules/simstack/util/db_logger.html +448 -0
- simstack/static/docs/_modules/simstack/util/default_from_dict.html +376 -0
- simstack/static/docs/_modules/simstack/util/directory_iterator.html +553 -0
- simstack/static/docs/_modules/simstack/util/docstring_parser.html +526 -0
- simstack/static/docs/_modules/simstack/util/file_hashing.html +394 -0
- simstack/static/docs/_modules/simstack/util/file_transfer_client.html +791 -0
- simstack/static/docs/_modules/simstack/util/files.html +733 -0
- simstack/static/docs/_modules/simstack/util/find_python_files.html +349 -0
- simstack/static/docs/_modules/simstack/util/generate_ui_schema.html +396 -0
- simstack/static/docs/_modules/simstack/util/generic_list_mixin.html +487 -0
- simstack/static/docs/_modules/simstack/util/get_module_path.html +336 -0
- simstack/static/docs/_modules/simstack/util/git_pull.html +381 -0
- simstack/static/docs/_modules/simstack/util/git_repository_status.html +411 -0
- simstack/static/docs/_modules/simstack/util/import_module.html +377 -0
- simstack/static/docs/_modules/simstack/util/importer.html +637 -0
- simstack/static/docs/_modules/simstack/util/init_data_source.html +357 -0
- simstack/static/docs/_modules/simstack/util/make_graph.html +423 -0
- simstack/static/docs/_modules/simstack/util/make_table.html +1171 -0
- simstack/static/docs/_modules/simstack/util/mappings.html +378 -0
- simstack/static/docs/_modules/simstack/util/minimal_route_finder.html +388 -0
- simstack/static/docs/_modules/simstack/util/mock_db.html +472 -0
- simstack/static/docs/_modules/simstack/util/module_path_checker.html +354 -0
- simstack/static/docs/_modules/simstack/util/object_list_mixin.html +649 -0
- simstack/static/docs/_modules/simstack/util/path_manager.html +566 -0
- simstack/static/docs/_modules/simstack/util/project_root_finder.html +357 -0
- simstack/static/docs/_modules/simstack/util/queue_watcher.html +593 -0
- simstack/static/docs/_modules/simstack/util/resource_config.html +532 -0
- simstack/static/docs/_modules/simstack/util/route_finder.html +390 -0
- simstack/static/docs/_modules/simstack/util/runner_util.html +487 -0
- simstack/static/docs/_modules/simstack/util/runner_utils.html +468 -0
- simstack/static/docs/_modules/simstack/util/safe_code_executor.html +510 -0
- simstack/static/docs/_modules/simstack/util/sample_config.html +414 -0
- simstack/static/docs/_modules/simstack/util/sensitive_content_filter.html +364 -0
- simstack/static/docs/_modules/simstack/util/setup_logging.html +365 -0
- simstack/static/docs/_modules/simstack/util/submit_to_watchdog.html +425 -0
- simstack/static/docs/_modules/simstack/util/toml_reader.html +482 -0
- simstack/static/docs/_modules/simstack/util/transform_file_name.html +357 -0
- simstack/static/docs/_modules/simstack/util/ui_tools.html +541 -0
- simstack/static/docs/_sources/architecture.rst.txt +25 -0
- simstack/static/docs/_sources/array_lists.rst.txt +60 -0
- simstack/static/docs/_sources/ci_pipeline.rst.txt +34 -0
- simstack/static/docs/_sources/data.rst.txt +175 -0
- simstack/static/docs/_sources/database_migrations.rst.txt +310 -0
- simstack/static/docs/_sources/datasets.rst.txt +93 -0
- simstack/static/docs/_sources/developer_guide.rst.txt +25 -0
- simstack/static/docs/_sources/docker_nodes.rst.txt +149 -0
- simstack/static/docs/_sources/files.rst.txt +159 -0
- simstack/static/docs/_sources/fire_and_forget_runner.rst.txt +67 -0
- simstack/static/docs/_sources/index.rst.txt +25 -0
- simstack/static/docs/_sources/installation.rst.txt +213 -0
- simstack/static/docs/_sources/lists.rst.txt +111 -0
- simstack/static/docs/_sources/mass_runner.rst.txt +91 -0
- simstack/static/docs/_sources/misc.rst.txt +106 -0
- simstack/static/docs/_sources/overview.rst.txt +91 -0
- simstack/static/docs/_sources/recovery.rst.txt +38 -0
- simstack/static/docs/_sources/resource_config.rst.txt +141 -0
- simstack/static/docs/_sources/simstack/modules/modules.rst.txt +7 -0
- simstack/static/docs/_sources/simstack/modules/simstack.core.rst.txt +205 -0
- simstack/static/docs/_sources/simstack/modules/simstack.core.services.rst.txt +109 -0
- simstack/static/docs/_sources/simstack/modules/simstack.methods.rst.txt +77 -0
- simstack/static/docs/_sources/simstack/modules/simstack.models.rst.txt +261 -0
- simstack/static/docs/_sources/simstack/modules/simstack.rst.txt +22 -0
- simstack/static/docs/_sources/simstack/modules/simstack.tables.rst.txt +45 -0
- simstack/static/docs/_sources/simstack/modules/simstack.util.rst.txt +381 -0
- simstack/static/docs/_sources/submit.rst.txt +141 -0
- simstack/static/docs/_sources/tables.rst.txt +50 -0
- simstack/static/docs/_sources/testing_complex_nodes.rst.txt +92 -0
- simstack/static/docs/_sources/ui_documentation.rst.txt +272 -0
- simstack/static/docs/_sources/workflows.rst.txt +446 -0
- simstack/static/docs/_static/base-stemmer.js +476 -0
- simstack/static/docs/_static/basic.css +906 -0
- simstack/static/docs/_static/cobalt2-theme.css +1 -0
- simstack/static/docs/_static/debug.css +69 -0
- simstack/static/docs/_static/docs-build-badge.css +51 -0
- simstack/static/docs/_static/docs-build-badge.js +51 -0
- simstack/static/docs/_static/doctools.js +150 -0
- simstack/static/docs/_static/documentation_options.js +13 -0
- simstack/static/docs/_static/english-stemmer.js +1066 -0
- simstack/static/docs/_static/file.png +0 -0
- simstack/static/docs/_static/language_data.js +13 -0
- simstack/static/docs/_static/minus.png +0 -0
- simstack/static/docs/_static/plus.png +0 -0
- simstack/static/docs/_static/pygments.css +250 -0
- simstack/static/docs/_static/scripts/furo-extensions.js +0 -0
- simstack/static/docs/_static/scripts/furo.js +3 -0
- simstack/static/docs/_static/scripts/furo.js.LICENSE.txt +7 -0
- simstack/static/docs/_static/scripts/furo.js.map +1 -0
- simstack/static/docs/_static/searchtools.js +693 -0
- simstack/static/docs/_static/skeleton.css +296 -0
- simstack/static/docs/_static/sphinx_highlight.js +159 -0
- simstack/static/docs/_static/styles/furo-extensions.css +2 -0
- simstack/static/docs/_static/styles/furo-extensions.css.map +1 -0
- simstack/static/docs/_static/styles/furo.css +2 -0
- simstack/static/docs/_static/styles/furo.css.map +1 -0
- simstack/static/docs/architecture.html +340 -0
- simstack/static/docs/array_lists.html +678 -0
- simstack/static/docs/ci_pipeline.html +385 -0
- simstack/static/docs/data.html +545 -0
- simstack/static/docs/database_migrations.html +652 -0
- simstack/static/docs/datasets.html +1268 -0
- simstack/static/docs/developer_guide.html +359 -0
- simstack/static/docs/docker_nodes.html +503 -0
- simstack/static/docs/files.html +718 -0
- simstack/static/docs/fire_and_forget_runner.html +641 -0
- simstack/static/docs/genindex.html +6390 -0
- simstack/static/docs/index.html +516 -0
- simstack/static/docs/installation.html +553 -0
- simstack/static/docs/lists.html +478 -0
- simstack/static/docs/mass_runner.html +481 -0
- simstack/static/docs/misc.html +454 -0
- simstack/static/docs/objects.inv +0 -0
- simstack/static/docs/overview.html +469 -0
- simstack/static/docs/py-modindex.html +1111 -0
- simstack/static/docs/recovery.html +371 -0
- simstack/static/docs/resource_config.html +590 -0
- simstack/static/docs/search.html +327 -0
- simstack/static/docs/searchindex.js +1 -0
- simstack/static/docs/simstack/modules/modules.html +489 -0
- simstack/static/docs/simstack/modules/simstack.core.html +1883 -0
- simstack/static/docs/simstack/modules/simstack.core.services.html +698 -0
- simstack/static/docs/simstack/modules/simstack.html +3060 -0
- simstack/static/docs/simstack/modules/simstack.methods.html +1150 -0
- simstack/static/docs/simstack/modules/simstack.models.html +13113 -0
- simstack/static/docs/simstack/modules/simstack.tables.html +635 -0
- simstack/static/docs/simstack/modules/simstack.util.html +3320 -0
- simstack/static/docs/submit.html +487 -0
- simstack/static/docs/tables.html +539 -0
- simstack/static/docs/testing_complex_nodes.html +458 -0
- simstack/static/docs/ui_documentation.html +788 -0
- simstack/static/docs/workflows.html +766 -0
- simstack/tables/__init__.py +0 -0
- simstack/tables/model_table.py +191 -0
- simstack/tables/node_children.py +219 -0
- simstack/tables/node_table.py +517 -0
- simstack/tables/table_builder.py +314 -0
- simstack/util/__init__.py +0 -0
- simstack/util/async_zip_utils.py +18 -0
- simstack/util/b64mixin.py +23 -0
- simstack/util/cleaned_json_schema.py +20 -0
- simstack/util/config_reader.py +179 -0
- simstack/util/custom_model_dump.py +75 -0
- simstack/util/database_information.py +160 -0
- simstack/util/db.py +1013 -0
- simstack/util/db_logger.py +117 -0
- simstack/util/default_from_dict.py +57 -0
- simstack/util/directory_iterator.py +216 -0
- simstack/util/docstring_parser.py +186 -0
- simstack/util/file_hashing.py +72 -0
- simstack/util/file_transfer_client.py +427 -0
- simstack/util/files.py +396 -0
- simstack/util/find_python_files.py +33 -0
- simstack/util/generate_ui_schema.py +80 -0
- simstack/util/generic_list_mixin.py +120 -0
- simstack/util/geometry_utils.py +118 -0
- simstack/util/get_module_path.py +20 -0
- simstack/util/git_pull.py +65 -0
- simstack/util/git_repository_status.py +95 -0
- simstack/util/import_module.py +63 -0
- simstack/util/importer.py +312 -0
- simstack/util/init_data_source.py +41 -0
- simstack/util/make_graph.py +107 -0
- simstack/util/make_table.py +837 -0
- simstack/util/mappings.py +41 -0
- simstack/util/minimal_route_finder.py +72 -0
- simstack/util/mock_db.py +144 -0
- simstack/util/module_path_checker.py +38 -0
- simstack/util/object_list_mixin.py +282 -0
- simstack/util/path_manager.py +223 -0
- simstack/util/project_root_finder.py +41 -0
- simstack/util/queue_watcher.py +262 -0
- simstack/util/resource_config.py +198 -0
- simstack/util/route_finder.py +74 -0
- simstack/util/runner_util.py +166 -0
- simstack/util/runner_utils.py +143 -0
- simstack/util/safe_code_executor.py +194 -0
- simstack/util/sample_config.py +98 -0
- simstack/util/sensitive_content_filter.py +48 -0
- simstack/util/setup_logging.py +49 -0
- simstack/util/submit_to_watchdog.py +106 -0
- simstack/util/toml_reader.py +142 -0
- simstack/util/transform_file_name.py +41 -0
- simstack/util/ui_tools.py +213 -0
- simstack-2.0.1.dist-info/METADATA +454 -0
- simstack-2.0.1.dist-info/RECORD +354 -0
- simstack-2.0.1.dist-info/WHEEL +5 -0
- simstack-2.0.1.dist-info/entry_points.txt +12 -0
- simstack-2.0.1.dist-info/licenses/LICENSE +21 -0
- simstack-2.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html class="no-js" lang="en" data-content_root="../../../../">
|
|
3
|
+
<head><meta charset="utf-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
5
|
+
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../../../genindex.html"><link rel="search" title="Search" href="../../../../search.html">
|
|
6
|
+
|
|
7
|
+
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
|
8
|
+
<title>simstack.core.services.runner_manager - SimStack II documentation</title>
|
|
9
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=d111a655" />
|
|
10
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/styles/furo.css?v=7bdb33bb" />
|
|
11
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
|
12
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/cobalt2-theme.css?v=2d651046" />
|
|
13
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/docs-build-badge.css?v=803faff8" />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<style>
|
|
19
|
+
body {
|
|
20
|
+
--color-code-background: #f2f2f2;
|
|
21
|
+
--color-code-foreground: #1e1e1e;
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
@media not print {
|
|
25
|
+
body[data-theme="dark"] {
|
|
26
|
+
--color-code-background: #202020;
|
|
27
|
+
--color-code-foreground: #d0d0d0;
|
|
28
|
+
--color-background-primary: #132738;
|
|
29
|
+
--color-background-secondary: #1e3a52;
|
|
30
|
+
--color-foreground-primary: #ffffff;
|
|
31
|
+
--color-foreground-secondary: #bac8d3;
|
|
32
|
+
--color-brand-primary: #22d5ff;
|
|
33
|
+
--color-brand-content: #0088ff;
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
@media (prefers-color-scheme: dark) {
|
|
37
|
+
body:not([data-theme="light"]) {
|
|
38
|
+
--color-code-background: #202020;
|
|
39
|
+
--color-code-foreground: #d0d0d0;
|
|
40
|
+
--color-background-primary: #132738;
|
|
41
|
+
--color-background-secondary: #1e3a52;
|
|
42
|
+
--color-foreground-primary: #ffffff;
|
|
43
|
+
--color-foreground-secondary: #bac8d3;
|
|
44
|
+
--color-brand-primary: #22d5ff;
|
|
45
|
+
--color-brand-content: #0088ff;
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</style></head>
|
|
51
|
+
<body>
|
|
52
|
+
|
|
53
|
+
<script>
|
|
54
|
+
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
59
|
+
<symbol id="svg-toc" viewBox="0 0 24 24">
|
|
60
|
+
<title>Contents</title>
|
|
61
|
+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
|
62
|
+
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
|
63
|
+
</svg>
|
|
64
|
+
</symbol>
|
|
65
|
+
<symbol id="svg-menu" viewBox="0 0 24 24">
|
|
66
|
+
<title>Menu</title>
|
|
67
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
68
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
|
69
|
+
<line x1="3" y1="12" x2="21" y2="12"></line>
|
|
70
|
+
<line x1="3" y1="6" x2="21" y2="6"></line>
|
|
71
|
+
<line x1="3" y1="18" x2="21" y2="18"></line>
|
|
72
|
+
</svg>
|
|
73
|
+
</symbol>
|
|
74
|
+
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
|
75
|
+
<title>Expand</title>
|
|
76
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
77
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
|
78
|
+
<polyline points="9 18 15 12 9 6"></polyline>
|
|
79
|
+
</svg>
|
|
80
|
+
</symbol>
|
|
81
|
+
<symbol id="svg-sun" viewBox="0 0 24 24">
|
|
82
|
+
<title>Light mode</title>
|
|
83
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
84
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
|
85
|
+
<circle cx="12" cy="12" r="5"></circle>
|
|
86
|
+
<line x1="12" y1="1" x2="12" y2="3"></line>
|
|
87
|
+
<line x1="12" y1="21" x2="12" y2="23"></line>
|
|
88
|
+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
|
89
|
+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
|
90
|
+
<line x1="1" y1="12" x2="3" y2="12"></line>
|
|
91
|
+
<line x1="21" y1="12" x2="23" y2="12"></line>
|
|
92
|
+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
|
93
|
+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
|
94
|
+
</svg>
|
|
95
|
+
</symbol>
|
|
96
|
+
<symbol id="svg-moon" viewBox="0 0 24 24">
|
|
97
|
+
<title>Dark mode</title>
|
|
98
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
99
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
|
100
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
101
|
+
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
|
102
|
+
</svg>
|
|
103
|
+
</symbol>
|
|
104
|
+
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
|
105
|
+
<title>Auto light/dark, in light mode</title>
|
|
106
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
107
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
|
108
|
+
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
|
109
|
+
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
|
110
|
+
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
|
111
|
+
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
|
112
|
+
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
|
113
|
+
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
|
114
|
+
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
|
115
|
+
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
|
116
|
+
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
|
117
|
+
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
|
118
|
+
<circle cx="14.5" cy="9.55" r="3.6"/>
|
|
119
|
+
</svg>
|
|
120
|
+
</symbol>
|
|
121
|
+
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
|
122
|
+
<title>Auto light/dark, in dark mode</title>
|
|
123
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
124
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
|
125
|
+
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
|
126
|
+
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
|
127
|
+
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
|
128
|
+
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
|
129
|
+
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
|
130
|
+
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
|
131
|
+
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
|
132
|
+
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
|
133
|
+
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
|
134
|
+
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
|
135
|
+
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
|
136
|
+
</svg>
|
|
137
|
+
</symbol>
|
|
138
|
+
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
|
139
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
140
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
|
141
|
+
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
|
142
|
+
<path d="M13.5 6.5l4 4" />
|
|
143
|
+
<path d="M20 21l2 -2l-2 -2" />
|
|
144
|
+
<path d="M17 17l-2 2l2 2" />
|
|
145
|
+
</svg>
|
|
146
|
+
</symbol>
|
|
147
|
+
<symbol id="svg-eye" viewBox="0 0 24 24">
|
|
148
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
149
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
|
150
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
151
|
+
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
|
152
|
+
<path
|
|
153
|
+
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
|
154
|
+
<path d="M20 21l2 -2l-2 -2" />
|
|
155
|
+
<path d="M17 17l-2 2l2 2" />
|
|
156
|
+
</svg>
|
|
157
|
+
</symbol>
|
|
158
|
+
</svg>
|
|
159
|
+
|
|
160
|
+
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
|
161
|
+
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
|
162
|
+
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
|
163
|
+
<label class="overlay toc-overlay" for="__toc"></label>
|
|
164
|
+
|
|
165
|
+
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<div class="page">
|
|
170
|
+
<header class="mobile-header">
|
|
171
|
+
<div class="header-left">
|
|
172
|
+
<label class="nav-overlay-icon" for="__navigation">
|
|
173
|
+
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
|
174
|
+
</label>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="header-center">
|
|
177
|
+
<a href="../../../../index.html"><div class="brand">SimStack II documentation</div></a>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="header-right">
|
|
180
|
+
<div class="theme-toggle-container theme-toggle-header">
|
|
181
|
+
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
|
182
|
+
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
|
183
|
+
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
|
184
|
+
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
|
185
|
+
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
|
186
|
+
</button>
|
|
187
|
+
</div>
|
|
188
|
+
<label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
|
|
189
|
+
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
|
190
|
+
</label>
|
|
191
|
+
</div>
|
|
192
|
+
</header>
|
|
193
|
+
<aside class="sidebar-drawer">
|
|
194
|
+
<div class="sidebar-container">
|
|
195
|
+
|
|
196
|
+
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../../../index.html">
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
</a><form class="sidebar-search-container" method="get" action="../../../../search.html" role="search">
|
|
200
|
+
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
|
201
|
+
<input type="hidden" name="check_keywords" value="yes">
|
|
202
|
+
<input type="hidden" name="area" value="default">
|
|
203
|
+
</form>
|
|
204
|
+
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
|
205
|
+
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
|
206
|
+
<ul>
|
|
207
|
+
<li class="toctree-l1"><a class="reference internal" href="../../../../overview.html">Overview</a></li>
|
|
208
|
+
<li class="toctree-l1"><a class="reference internal" href="../../../../workflows.html">Workflows</a></li>
|
|
209
|
+
<li class="toctree-l1"><a class="reference internal" href="../../../../ui_documentation.html">Graphical User Interface</a></li>
|
|
210
|
+
<li class="toctree-l1 has-children"><a class="reference internal" href="../../../../developer_guide.html">Developer Guide</a><input aria-label="Toggle navigation of Developer Guide" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
|
211
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../data.html">Persisting and Visualizing Data</a></li>
|
|
212
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../datasets.html">Datasets</a></li>
|
|
213
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../lists.html">List Mixins</a></li>
|
|
214
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../array_lists.html">Array Lists</a></li>
|
|
215
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../tables.html">Tables</a></li>
|
|
216
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../files.html">File Management</a></li>
|
|
217
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../resource_config.html">Program Execution</a></li>
|
|
218
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../mass_runner.html">MassRunner</a></li>
|
|
219
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../fire_and_forget_runner.html">FireAndForgetRunner</a></li>
|
|
220
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../docker_nodes.html">Creating Docker Containers for SimStack Nodes</a></li>
|
|
221
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../testing_complex_nodes.html">Testing Complex Nodes</a></li>
|
|
222
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../database_migrations.html">Database Migrations</a></li>
|
|
223
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../ci_pipeline.html">CI Pipeline and Documentation Artifacts</a></li>
|
|
224
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../misc.html">Miscellaneous</a></li>
|
|
225
|
+
</ul>
|
|
226
|
+
</li>
|
|
227
|
+
<li class="toctree-l1"><a class="reference internal" href="../../../../installation.html">Simstack II Setup</a></li>
|
|
228
|
+
<li class="toctree-l1 has-children"><a class="reference internal" href="../../../../simstack/modules/modules.html">simstack</a><input aria-label="Toggle navigation of simstack" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
|
229
|
+
<li class="toctree-l2 has-children"><a class="reference internal" href="../../../../simstack/modules/simstack.html">simstack package</a><input aria-label="Toggle navigation of simstack package" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
|
230
|
+
<li class="toctree-l3 has-children"><a class="reference internal" href="../../../../simstack/modules/simstack.core.html">simstack.core package</a><input aria-label="Toggle navigation of simstack.core package" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
|
231
|
+
<li class="toctree-l4"><a class="reference internal" href="../../../../simstack/modules/simstack.core.services.html">simstack.core.services package</a></li>
|
|
232
|
+
</ul>
|
|
233
|
+
</li>
|
|
234
|
+
<li class="toctree-l3"><a class="reference internal" href="../../../../simstack/modules/simstack.methods.html">simstack.methods package</a></li>
|
|
235
|
+
<li class="toctree-l3"><a class="reference internal" href="../../../../simstack/modules/simstack.models.html">simstack.models package</a></li>
|
|
236
|
+
<li class="toctree-l3"><a class="reference internal" href="../../../../simstack/modules/simstack.tables.html">simstack.tables package</a></li>
|
|
237
|
+
<li class="toctree-l3"><a class="reference internal" href="../../../../simstack/modules/simstack.util.html">simstack.util package</a></li>
|
|
238
|
+
</ul>
|
|
239
|
+
</li>
|
|
240
|
+
</ul>
|
|
241
|
+
</li>
|
|
242
|
+
</ul>
|
|
243
|
+
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
</div>
|
|
250
|
+
</aside>
|
|
251
|
+
<div class="main">
|
|
252
|
+
<div class="content">
|
|
253
|
+
<div class="article-container">
|
|
254
|
+
<a href="#" class="back-to-top muted-link">
|
|
255
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
256
|
+
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
|
257
|
+
</svg>
|
|
258
|
+
<span>Back to top</span>
|
|
259
|
+
</a>
|
|
260
|
+
<div class="content-icon-container">
|
|
261
|
+
<div class="theme-toggle-container theme-toggle-content">
|
|
262
|
+
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
|
263
|
+
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
|
264
|
+
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
|
265
|
+
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
|
266
|
+
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
|
267
|
+
</button>
|
|
268
|
+
</div>
|
|
269
|
+
<label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
|
|
270
|
+
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
|
271
|
+
</label>
|
|
272
|
+
</div>
|
|
273
|
+
<article role="main" id="furo-main-content">
|
|
274
|
+
<h1>Source code for simstack.core.services.runner_manager</h1><div class="highlight"><pre>
|
|
275
|
+
<span></span><span class="kn">import</span><span class="w"> </span><span class="nn">asyncio</span>
|
|
276
|
+
<span class="kn">import</span><span class="w"> </span><span class="nn">logging</span>
|
|
277
|
+
<span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
|
|
278
|
+
<span class="kn">import</span><span class="w"> </span><span class="nn">platform</span>
|
|
279
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">pathlib</span><span class="w"> </span><span class="kn">import</span> <span class="n">Path</span>
|
|
280
|
+
|
|
281
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.base_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">BaseService</span>
|
|
282
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.context</span><span class="w"> </span><span class="kn">import</span> <span class="n">context</span>
|
|
283
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.models.parameters</span><span class="w"> </span><span class="kn">import</span> <span class="n">Resource</span>
|
|
284
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.node_execution_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">NodeExecutionService</span>
|
|
285
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.runner_status_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">RunnerStatusService</span>
|
|
286
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.runner_cleanup_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">RunnerCleanupService</span>
|
|
287
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.file_transfer_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">FileTransferService</span>
|
|
288
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.slurm_status_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">SlurmStatusService</span>
|
|
289
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.resource_branch_monitor_service</span><span class="w"> </span><span class="kn">import</span> <span class="p">(</span>
|
|
290
|
+
<span class="n">ResourceBranchMonitorService</span><span class="p">,</span>
|
|
291
|
+
<span class="p">)</span>
|
|
292
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.stop_check_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">StopCheckService</span>
|
|
293
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.git_uv_update_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">GitUvUpdateService</span>
|
|
294
|
+
<span class="kn">from</span><span class="w"> </span><span class="nn">simstack.core.services.timeout_restart_service</span><span class="w"> </span><span class="kn">import</span> <span class="n">TimeoutRestartService</span>
|
|
295
|
+
|
|
296
|
+
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">"NodeRunner"</span><span class="p">)</span>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<div class="viewcode-block" id="RunnerManager">
|
|
300
|
+
<a class="viewcode-back" href="../../../../simstack/modules/simstack.core.services.html#simstack.core.services.runner_manager.RunnerManager">[docs]</a>
|
|
301
|
+
<span class="k">class</span><span class="w"> </span><span class="nc">RunnerManager</span><span class="p">:</span>
|
|
302
|
+
<span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span>
|
|
303
|
+
<span class="bp">self</span><span class="p">,</span>
|
|
304
|
+
<span class="n">resource</span><span class="p">:</span> <span class="n">Resource</span><span class="p">,</span>
|
|
305
|
+
<span class="n">detach</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
|
|
306
|
+
<span class="n">no_pull</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
|
|
307
|
+
<span class="n">is_default</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
|
|
308
|
+
<span class="n">with_file_transfer</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
|
|
309
|
+
<span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
|
310
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_resource</span> <span class="o">=</span> <span class="n">resource</span>
|
|
311
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_detach</span> <span class="o">=</span> <span class="n">detach</span>
|
|
312
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_no_pull</span> <span class="o">=</span> <span class="n">no_pull</span>
|
|
313
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_pid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getpid</span><span class="p">()</span>
|
|
314
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="n">BaseService</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>
|
|
315
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_shutdown_event</span><span class="p">:</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">Event</span> <span class="o">=</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">Event</span><span class="p">()</span>
|
|
316
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_pid_file</span><span class="p">:</span> <span class="n">Path</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="n">context</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">workdir</span><span class="p">)</span> <span class="o">/</span> <span class="sa">f</span><span class="s2">"runner_</span><span class="si">{</span><span class="n">resource</span><span class="si">}</span><span class="s2">.pid"</span>
|
|
317
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_is_default</span> <span class="o">=</span> <span class="n">is_default</span>
|
|
318
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_with_file_transfer</span> <span class="o">=</span> <span class="n">with_file_transfer</span>
|
|
319
|
+
|
|
320
|
+
<span class="k">def</span><span class="w"> </span><span class="nf">_is_process_running</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pid</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span>
|
|
321
|
+
<span class="w"> </span><span class="sd">"""Check if a process with given PID is running and is a simstack_runner process"""</span>
|
|
322
|
+
<span class="k">try</span><span class="p">:</span>
|
|
323
|
+
<span class="k">if</span> <span class="n">platform</span><span class="o">.</span><span class="n">system</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"Windows"</span><span class="p">:</span>
|
|
324
|
+
<span class="c1"># On Windows, os.kill with signal 0 doesn't work, use tasklist</span>
|
|
325
|
+
<span class="kn">import</span><span class="w"> </span><span class="nn">subprocess</span>
|
|
326
|
+
|
|
327
|
+
<span class="n">result</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">run</span><span class="p">(</span>
|
|
328
|
+
<span class="p">[</span><span class="s2">"tasklist"</span><span class="p">,</span> <span class="s2">"/FI"</span><span class="p">,</span> <span class="sa">f</span><span class="s2">"PID eq </span><span class="si">{</span><span class="n">pid</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> <span class="s2">"/V"</span><span class="p">,</span> <span class="s2">"/FO"</span><span class="p">,</span> <span class="s2">"CSV"</span><span class="p">],</span>
|
|
329
|
+
<span class="n">capture_output</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
|
|
330
|
+
<span class="n">text</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="c1"># keep bytes; avoid UnicodeDecodeError from console code pages</span>
|
|
331
|
+
<span class="p">)</span>
|
|
332
|
+
<span class="c1"># Check if process exists and command line contains simstack_runner</span>
|
|
333
|
+
<span class="n">stdout</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">"utf-8"</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="s2">"ignore"</span><span class="p">)</span>
|
|
334
|
+
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">pid</span><span class="p">)</span> <span class="ow">in</span> <span class="n">stdout</span> <span class="ow">and</span> <span class="s2">"simstack_runner"</span> <span class="ow">in</span> <span class="n">stdout</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
|
|
335
|
+
<span class="k">else</span><span class="p">:</span>
|
|
336
|
+
<span class="c1"># Check if process exists</span>
|
|
337
|
+
<span class="n">os</span><span class="o">.</span><span class="n">kill</span><span class="p">(</span><span class="n">pid</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
|
338
|
+
<span class="c1"># Verify it's a simstack_runner process by checking command line</span>
|
|
339
|
+
<span class="k">try</span><span class="p">:</span>
|
|
340
|
+
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="sa">f</span><span class="s2">"/proc/</span><span class="si">{</span><span class="n">pid</span><span class="si">}</span><span class="s2">/cmdline"</span><span class="p">,</span> <span class="s2">"r"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
|
341
|
+
<span class="n">cmdline</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
|
342
|
+
<span class="k">return</span> <span class="s2">"simstack_runner"</span> <span class="ow">in</span> <span class="n">cmdline</span>
|
|
343
|
+
<span class="k">except</span> <span class="p">(</span><span class="ne">FileNotFoundError</span><span class="p">,</span> <span class="ne">PermissionError</span><span class="p">):</span>
|
|
344
|
+
<span class="c1"># If we can't read cmdline, fall back to just checking if process exists</span>
|
|
345
|
+
<span class="k">return</span> <span class="kc">True</span>
|
|
346
|
+
<span class="k">except</span> <span class="p">(</span><span class="ne">OSError</span><span class="p">,</span> <span class="ne">ProcessLookupError</span><span class="p">):</span>
|
|
347
|
+
<span class="k">return</span> <span class="kc">False</span>
|
|
348
|
+
|
|
349
|
+
<span class="k">def</span><span class="w"> </span><span class="nf">_check_existing_runner</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
|
350
|
+
<span class="w"> </span><span class="sd">"""Check if another runner for this resource is already running on this host"""</span>
|
|
351
|
+
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_pid_file</span><span class="o">.</span><span class="n">exists</span><span class="p">():</span>
|
|
352
|
+
<span class="k">try</span><span class="p">:</span>
|
|
353
|
+
<span class="n">existing_pid</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_pid_file</span><span class="o">.</span><span class="n">read_text</span><span class="p">()</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
|
|
354
|
+
<span class="k">if</span> <span class="n">existing_pid</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_pid</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_process_running</span><span class="p">(</span><span class="n">existing_pid</span><span class="p">):</span>
|
|
355
|
+
<span class="n">error_msg</span> <span class="o">=</span> <span class="p">(</span>
|
|
356
|
+
<span class="sa">f</span><span class="s2">"Another runner for resource '</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="si">}</span><span class="s2">' is already running "</span>
|
|
357
|
+
<span class="sa">f</span><span class="s2">"on this host with PID </span><span class="si">{</span><span class="n">existing_pid</span><span class="si">}</span><span class="s2">. Exiting."</span>
|
|
358
|
+
<span class="p">)</span>
|
|
359
|
+
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="n">error_msg</span><span class="p">)</span>
|
|
360
|
+
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">error_msg</span><span class="p">)</span>
|
|
361
|
+
<span class="k">else</span><span class="p">:</span>
|
|
362
|
+
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
|
|
363
|
+
<span class="sa">f</span><span class="s2">"Stale PID file found for resource '</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="si">}</span><span class="s2">'. "</span>
|
|
364
|
+
<span class="sa">f</span><span class="s2">"Overwriting with current PID </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_pid</span><span class="si">}</span><span class="s2">."</span>
|
|
365
|
+
<span class="p">)</span>
|
|
366
|
+
<span class="k">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">OSError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
|
367
|
+
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span>
|
|
368
|
+
<span class="sa">f</span><span class="s2">"Could not read PID file: </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s2">. Proceeding with startup."</span>
|
|
369
|
+
<span class="p">)</span>
|
|
370
|
+
|
|
371
|
+
<div class="viewcode-block" id="RunnerManager.stop_all_services">
|
|
372
|
+
<a class="viewcode-back" href="../../../../simstack/modules/simstack.core.services.html#simstack.core.services.runner_manager.RunnerManager.stop_all_services">[docs]</a>
|
|
373
|
+
<span class="k">async</span> <span class="k">def</span><span class="w"> </span><span class="nf">stop_all_services</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
|
374
|
+
<span class="w"> </span><span class="sd">"""Gracefully stop all registered services"""</span>
|
|
375
|
+
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Stopping all services..."</span><span class="p">)</span>
|
|
376
|
+
<span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">gather</span><span class="p">(</span>
|
|
377
|
+
<span class="o">*</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="p">),</span> <span class="n">return_exceptions</span><span class="o">=</span><span class="kc">True</span>
|
|
378
|
+
<span class="p">)</span></div>
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
<div class="viewcode-block" id="RunnerManager.run_nodes_for_resource">
|
|
382
|
+
<a class="viewcode-back" href="../../../../simstack/modules/simstack.core.services.html#simstack.core.services.runner_manager.RunnerManager.run_nodes_for_resource">[docs]</a>
|
|
383
|
+
<span class="k">async</span> <span class="k">def</span><span class="w"> </span><span class="nf">run_nodes_for_resource</span><span class="p">(</span>
|
|
384
|
+
<span class="bp">self</span><span class="p">,</span>
|
|
385
|
+
<span class="n">polling_interval</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span>
|
|
386
|
+
<span class="n">max_concurrent</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">10</span><span class="p">,</span>
|
|
387
|
+
<span class="n">timeout</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
|
|
388
|
+
<span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
|
389
|
+
<span class="w"> </span><span class="sd">"""Orchestrates multiple independent services"""</span>
|
|
390
|
+
<span class="c1"># Check if another runner is already running for this resource</span>
|
|
391
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_check_existing_runner</span><span class="p">()</span>
|
|
392
|
+
|
|
393
|
+
<span class="c1"># Save PID on startup</span>
|
|
394
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_pid_file</span><span class="o">.</span><span class="n">write_text</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_pid</span><span class="p">))</span>
|
|
395
|
+
|
|
396
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_services</span> <span class="o">=</span> <span class="p">[</span>
|
|
397
|
+
<span class="n">NodeExecutionService</span><span class="p">(</span>
|
|
398
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span>
|
|
399
|
+
<span class="n">polling_interval</span><span class="p">,</span>
|
|
400
|
+
<span class="n">max_concurrent</span><span class="p">,</span>
|
|
401
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_shutdown_event</span><span class="p">,</span>
|
|
402
|
+
<span class="n">detach</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_detach</span><span class="p">,</span>
|
|
403
|
+
<span class="n">is_default</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_default</span><span class="p">,</span>
|
|
404
|
+
<span class="p">),</span>
|
|
405
|
+
<span class="n">RunnerStatusService</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">interval</span><span class="o">=</span><span class="mi">60</span><span class="p">),</span>
|
|
406
|
+
<span class="n">RunnerCleanupService</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">interval</span><span class="o">=</span><span class="mi">300</span><span class="p">),</span>
|
|
407
|
+
<span class="n">SlurmStatusService</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">interval</span><span class="o">=</span><span class="mi">60</span><span class="p">),</span>
|
|
408
|
+
<span class="n">StopCheckService</span><span class="p">(</span>
|
|
409
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">interval</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">shutdown_event</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_shutdown_event</span>
|
|
410
|
+
<span class="p">),</span>
|
|
411
|
+
<span class="p">]</span>
|
|
412
|
+
|
|
413
|
+
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_with_file_transfer</span><span class="p">:</span>
|
|
414
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
|
415
|
+
<span class="n">FileTransferService</span><span class="p">(</span>
|
|
416
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span>
|
|
417
|
+
<span class="n">interval</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>
|
|
418
|
+
<span class="n">max_concurrent</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
|
|
419
|
+
<span class="n">shutdown_event</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_shutdown_event</span><span class="p">,</span>
|
|
420
|
+
<span class="p">)</span>
|
|
421
|
+
<span class="p">)</span>
|
|
422
|
+
|
|
423
|
+
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_no_pull</span><span class="p">:</span>
|
|
424
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">GitUvUpdateService</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">interval</span><span class="o">=</span><span class="mi">60</span><span class="p">))</span>
|
|
425
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
|
426
|
+
<span class="n">ResourceBranchMonitorService</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">interval</span><span class="o">=</span><span class="mi">60</span><span class="p">)</span>
|
|
427
|
+
<span class="p">)</span>
|
|
428
|
+
|
|
429
|
+
<span class="c1"># Add timeout restart service if timeout is specified</span>
|
|
430
|
+
<span class="k">if</span> <span class="n">timeout</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
|
|
431
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">TimeoutRestartService</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_resource</span><span class="p">,</span> <span class="n">timeout</span><span class="p">))</span>
|
|
432
|
+
|
|
433
|
+
<span class="c1"># Start all services</span>
|
|
434
|
+
<span class="n">service_tasks</span> <span class="o">=</span> <span class="p">[</span><span class="n">service</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="k">for</span> <span class="n">service</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_services</span><span class="p">]</span>
|
|
435
|
+
|
|
436
|
+
<span class="k">try</span><span class="p">:</span>
|
|
437
|
+
<span class="c1"># Wait for either a service task to finish or the shutdown event to be set</span>
|
|
438
|
+
<span class="n">shutdown_task</span> <span class="o">=</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">create_task</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_shutdown_event</span><span class="o">.</span><span class="n">wait</span><span class="p">())</span>
|
|
439
|
+
<span class="n">tasks_to_wait</span> <span class="o">=</span> <span class="p">[</span><span class="o">*</span><span class="n">service_tasks</span><span class="p">,</span> <span class="n">shutdown_task</span><span class="p">]</span>
|
|
440
|
+
<span class="n">done</span><span class="p">,</span> <span class="n">pending</span> <span class="o">=</span> <span class="k">await</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">wait</span><span class="p">(</span>
|
|
441
|
+
<span class="n">tasks_to_wait</span><span class="p">,</span> <span class="n">return_when</span><span class="o">=</span><span class="n">asyncio</span><span class="o">.</span><span class="n">FIRST_COMPLETED</span>
|
|
442
|
+
<span class="p">)</span>
|
|
443
|
+
<span class="k">finally</span><span class="p">:</span>
|
|
444
|
+
<span class="k">await</span> <span class="bp">self</span><span class="o">.</span><span class="n">stop_all_services</span><span class="p">()</span></div>
|
|
445
|
+
</div>
|
|
446
|
+
|
|
447
|
+
</pre></div>
|
|
448
|
+
</article>
|
|
449
|
+
</div>
|
|
450
|
+
<footer>
|
|
451
|
+
|
|
452
|
+
<div class="related-pages">
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
</div>
|
|
456
|
+
<div class="bottom-of-page">
|
|
457
|
+
<div class="left-details">
|
|
458
|
+
<div class="copyright">
|
|
459
|
+
Copyright © 2026, Wolfgang Wenzel
|
|
460
|
+
</div>
|
|
461
|
+
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
|
462
|
+
|
|
463
|
+
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
|
464
|
+
|
|
465
|
+
</div>
|
|
466
|
+
<div class="right-details">
|
|
467
|
+
|
|
468
|
+
</div>
|
|
469
|
+
</div>
|
|
470
|
+
|
|
471
|
+
</footer>
|
|
472
|
+
</div>
|
|
473
|
+
<aside class="toc-drawer no-toc">
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
</aside>
|
|
478
|
+
</div>
|
|
479
|
+
</div><script src="../../../../_static/documentation_options.js?v=5929fcd5"></script>
|
|
480
|
+
<script src="../../../../_static/doctools.js?v=fd6eb6e6"></script>
|
|
481
|
+
<script src="../../../../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
|
482
|
+
<script src="../../../../_static/scripts/furo.js?v=46bd48cc"></script>
|
|
483
|
+
<script data-docs-built-at="2026-07-17 10:50:10 UTC" src="../../../../_static/docs-build-badge.js?v=57cb9fc6"></script>
|
|
484
|
+
</body>
|
|
485
|
+
</html>
|