perun.monitoring.application

Application module.

Attributes

log

Classes

Application

Represents an application to be executed.

Module Contents

perun.monitoring.application.log[source]
class perun.monitoring.application.Application(app: pathlib.Path | Callable | str, config: configparser.ConfigParser, is_binary: bool = False, args: tuple[Any, Ellipsis] = (), kwargs: dict[str, Any] = {})[source]

Represents an application to be executed.

Parameters:
  • app (Path | Callable) – The application to be executed. It can be either a file path or a callable object.

  • config (ConfigParser) – The configuration object containing application settings.

  • args (tuple, optional) – Positional arguments to be passed to the application (default is an empty tuple).

  • kwargs (dict, optional) – Keyword arguments to be passed to the application (default is an empty dictionary).

name

The name of the application.

Type:

str

args

The positional arguments to be passed to the application.

Type:

tuple

kwargs

The keyword arguments to be passed to the application.

Type:

dict

run()[source]

Executes the application.

property name: str

Return the application name.

property args: tuple[Any, Ellipsis]

Return the application positional arguments.

property kwargs: dict[str, Any]

Return the application keyword arguments.

property is_binary: bool

Return the application keyword arguments.

run() Any[source]

Execute the application. If callable, returns the function result.

Raises:

ValueError – If the application is not found.