Clinner provides some useful mixins for main classes that adds different behaviors to these classes.
Adds health checking behavior to Main classes. To do that is necessary to define a health_check method responsible of return the current status of the application.
This mixin also adds a new parameter
--retrythat defines the number of retries done after a failure. These retries uses an exponential backoff to calculate timing.
Does a health check.
Returns: True if health check was successful. False otherwise.
Run specified command through system arguments.
Before running the command, a health check function will be called and if result is not successful, the command will be aborted.
Arguments that have been parsed properly will be passed through **kwargs. Unknown arguments will be passed as a list of strings through *args.
This method will print a header and the return code.