optimized code formating

This commit is contained in:
Kevin Veen-Birkenbach 2024-02-05 19:18:54 +01:00
parent da7e5cc9be
commit 6537626d77
1 changed files with 10 additions and 10 deletions

View File

@ -55,16 +55,16 @@ IMAGES_NO_BACKUP_REQUIRED = [
'memcached' 'memcached'
] ]
DIRNAME = os.path.dirname(__file__) # DEFINE CONSTANTS
DIRNAME = os.path.dirname(__file__)
DATABASES = pandas.read_csv(os.path.join(DIRNAME, "databases.csv"), sep=";") SCRIPTS_DIRECTORY = pathlib.Path(os.path.realpath(__file__)).parent.parent
REPOSITORY_NAME = os.path.basename(DIRNAME) DATABASES = pandas.read_csv(os.path.join(DIRNAME, "databases.csv"), sep=";")
MACHINE_ID = get_machine_id() REPOSITORY_NAME = os.path.basename(DIRNAME)
BACKUPS_DIR = '/Backups/' MACHINE_ID = get_machine_id()
VERSIONS_DIR = os.path.join(BACKUPS_DIR, MACHINE_ID, REPOSITORY_NAME) BACKUPS_DIR = '/Backups/'
BACKUP_TIME = datetime.now().strftime("%Y%m%d%H%M%S") VERSIONS_DIR = os.path.join(BACKUPS_DIR, MACHINE_ID, REPOSITORY_NAME)
VERSION_DIR = create_version_directory() BACKUP_TIME = datetime.now().strftime("%Y%m%d%H%M%S")
SCRIPTS_DIRECTORY = pathlib.Path(os.path.realpath(__file__)).parent.parent VERSION_DIR = create_version_directory()
def get_instance(container): def get_instance(container):
# The function is defined to take one parameter, 'container', # The function is defined to take one parameter, 'container',