fm_weck.grpc_service package¶
Subpackages¶
Submodules¶
fm_weck.grpc_service.fm_weck_client module¶
- fm_weck.grpc_service.fm_weck_client.client_expert_run(tool: Tuple[Path, str], host: str, command: list[str], timelimit: int)[source]¶
- fm_weck.grpc_service.fm_weck_client.client_run(tool: Tuple[Path, str], host: str, prop: Path, files: list[Path], timelimit: int)[source]¶
fm_weck.grpc_service.fm_weck_server module¶
- class fm_weck.grpc_service.fm_weck_server.FmWeckRemote[source]¶
Bases:
FmWeckRemoteServicer- cancelRun(request: CancelRunRequest, context) CancelRunResult[source]¶
Cancels a previously started run.
- queryFiles(query: FileQuery, context) Generator[File, None, None][source]¶
Query for a number of result files.
fm_weck.grpc_service.request_handling module¶
- class fm_weck.grpc_service.request_handling.RunHandler(request: RunRequest)[source]¶
Bases:
object- close()[source]¶
Close the process and the result listener. It is a StillRunningError to call this method if the process is still running.
- get_file(file_name: str) Path[source]¶
Finds the file with the given name in the output directory of the run. :param file_name: The name of the file. :return: The path to the file. :raises FileNotFoundError: If the file does not exist.
- glob(name_pattern: str) Generator[Path, None, None][source]¶
Finds all files in the output directory of the run that match the given pattern. :param name_pattern: The pattern to match. :return: The paths to the files.
- is_canceled()[source]¶
Returns True if the run was really canceled, i.e. the underlying process terminated, False otherwise. Since cancelling a finished run has no effect, calling cancel_run will not necessarily result in is_canceled() returning True.
- mp = <multiprocessing.context.SpawnContext object>¶
- property output: str¶
- property output_files: Generator[str, None, None]¶
Names of the files produced by the run.
- successful() bool[source]¶
Returns True if the run was successful, False otherwise.
- Raises:
StillRunningError – If the run is still running.
ValueError – If the run has not been started yet.
fm_weck.grpc_service.run_store module¶
- fm_weck.grpc_service.run_store.add_run(run_handler: RunHandler) str[source]¶
- fm_weck.grpc_service.run_store.get_run(run_id: str) RunHandler[source]¶