kaskada.api.local_session.local_service

Module Contents

Classes

SubprocessFactory

KaskadaLocalService

Represents the resources associated with running a local service. This includes:

Attributes

logger

logger[source]
class SubprocessFactory[source]
get_subprocess(cmd, stderr, stdout)[source]
Parameters:
Return type:

subprocess.Popen

class KaskadaLocalService(service_name, binary_path, binary_execute_cmd, std_err_log_path, std_out_log_path, configs, subprocess_factory=SubprocessFactory())[source]

Represents the resources associated with running a local service. This includes: - Service name - Path to the binary with execution command - Path to std err - Path to std out - Configurations to run the binary

Parameters:
process: Optional[subprocess.Popen][source]
start()[source]

Starts the local service.

is_running()[source]

Reports if a local service is running by checking the return code of the process.

Returns:

True if the polled process has not returned. False otherwise.

Return type:

bool

stop(max_wait_seconds=5)[source]

Stops the local service gracefully by sending a SIGTERM.

Parameters:

max_wait_seconds (int) –

__get_configs_as_args()[source]
__get_subprocess_cmd()[source]