Environment related in interfaces
Bases: concurrent.core.components.component.Interface
Extension point that defines component which needs to perform any upgrade actions
TODO: @Joze: Integrate database manager, needs to be passed to the component
Bases: concurrent.core.components.component.Interface
Extension point that defines a component which will be able to act when a backup will be performed.
Bases: concurrent.core.components.component.Interface
Extension point that defines a component which will be able to act when an environment gets deleted
Basic command line application
Bases: concurrent.tools.console.CMD
Bash application that helps us with our env’s.
Will return true if the environment can be opened and false otherwise
launch the current app or a different one in the env. Different apps are usful to testing reasons!
Bases: concurrent.core.exceptions.baseerror.BaseError
Simple error used when trying to recover an env from a backup file
Basic Concurrent environment
Bases: concurrent.core.components.component.Component, concurrent.core.components.component.ComponentManager
This is our environment, it represents a real physical structure in disc where a aplications life’s in.
The env is a like:
- BasePath/
- logs/
- configs/
- plugins/
- backups/
Every folder in our environment needs a dummy file, this file is used in env checks! The name of the dummy file is espected to be equal the name of the direct parent folder.
Initialize member vasr of the component. Concurrent will initialize the environment (env) the config handle (config) and the logger (log)
List of components that implement IEnvBackup
Check if the current basepath is a valid environment. It just checks if all directories and needed files are in here.
Check if the dir has a file with the same name as it’s children
Will try to create a new environment. Our basepath has already been set in the constructor.
If args contains (‘baseon’, ‘file’), default values will not be loaded; they are expected to be provided by that file or other options.
List of components that implement IEnvDelete
Path from where we load additional plugins. Apart from those we’ll load all those located in the path pointed out plugins env var.
enabling.
If your log type is file this will be the target file
Custom logging format.
If nothing is set, the following will be used:
[$(project_name)s][$(app)s][$(module)s] $(levelname)s: $(message)s
Python logger Level: (CRITICAL, ERROR, WARN, INFO, DEBUG)
type of log we’ll use: (none, file, stderr, syslog, winlog)
Application that will run in this environment.
Short description of the project.
Name of the project.
Will try to load the environment config file using our config reader. If we need to use the defaults we’ll also regenerate the config file.
Upgrade database.
@param backup: whether or not to backup before upgrading @param backup_dest: name of the backup file @return: whether the upgrade was performed
List of components that implement IEnvUpgrader
Bases: concurrent.core.exceptions.baseerror.BaseError
Error raised when the env got bad folders
Bases: concurrent.core.exceptions.baseerror.BaseError
Error raised when the env saved was build with a different version
Bases: concurrent.core.components.component.Component
Component which will act as the setup manager for the environment. Also handles main backup/restore procedures if something hapens to the environment
This will perform the actual upgrade process. Be careful on using db transactions