perun.monitoring.application
Application module.
Attributes
Classes
Represents an application to be executed. |
Module Contents
- perun.monitoring.application.log
- class perun.monitoring.application.Application(app: pathlib.Path | Callable | str, config: configparser.ConfigParser, is_binary: bool = False, args: tuple = (), kwargs: Dict = {})
Represents an application to be executed.
Parameters
- appUnion[Path, Callable]
The application to be executed. It can be either a file path or a callable object.
- configConfigParser
The configuration object containing application settings.
- argstuple, optional
Positional arguments to be passed to the application (default is an empty tuple).
- kwargsDict, optional
Keyword arguments to be passed to the application (default is an empty dictionary).
Attributes
- namestr
The name of the application.
- argstuple
The positional arguments to be passed to the application.
- kwargsDict
The keyword arguments to be passed to the application.
Methods
- run()
Executes the application.
- _app
- _name
- _args
- _kwargs
- _is_binary
- property name
- Return the application name.
- property args
- Return the application positional arguments.
- property kwargs
- Return the application keyword arguments.
- property is_binary
- Return the application keyword arguments.
- _setName(config: configparser.ConfigParser) str
Return the application name based on the configuration and application path.
Parameters
- configConfigParser
The configuration object containing application settings.
Returns
- str
The application name.
- _cleanup()
- __str__()
Return the application name.
- __repr__()
Return the application name.