mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2024-11-21 16:01:03 +01:00
optimized code formating
This commit is contained in:
parent
da7e5cc9be
commit
6537626d77
@ -55,8 +55,9 @@ IMAGES_NO_BACKUP_REQUIRED = [
|
|||||||
'memcached'
|
'memcached'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# DEFINE CONSTANTS
|
||||||
DIRNAME = os.path.dirname(__file__)
|
DIRNAME = os.path.dirname(__file__)
|
||||||
|
SCRIPTS_DIRECTORY = pathlib.Path(os.path.realpath(__file__)).parent.parent
|
||||||
DATABASES = pandas.read_csv(os.path.join(DIRNAME, "databases.csv"), sep=";")
|
DATABASES = pandas.read_csv(os.path.join(DIRNAME, "databases.csv"), sep=";")
|
||||||
REPOSITORY_NAME = os.path.basename(DIRNAME)
|
REPOSITORY_NAME = os.path.basename(DIRNAME)
|
||||||
MACHINE_ID = get_machine_id()
|
MACHINE_ID = get_machine_id()
|
||||||
@ -64,7 +65,6 @@ BACKUPS_DIR = '/Backups/'
|
|||||||
VERSIONS_DIR = os.path.join(BACKUPS_DIR, MACHINE_ID, REPOSITORY_NAME)
|
VERSIONS_DIR = os.path.join(BACKUPS_DIR, MACHINE_ID, REPOSITORY_NAME)
|
||||||
BACKUP_TIME = datetime.now().strftime("%Y%m%d%H%M%S")
|
BACKUP_TIME = datetime.now().strftime("%Y%m%d%H%M%S")
|
||||||
VERSION_DIR = create_version_directory()
|
VERSION_DIR = create_version_directory()
|
||||||
SCRIPTS_DIRECTORY = pathlib.Path(os.path.realpath(__file__)).parent.parent
|
|
||||||
|
|
||||||
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',
|
||||||
|
Loading…
Reference in New Issue
Block a user