#1796: Add ability to create and restore database backups + add more sys log messages + remove the link size checks temporarily

This commit is contained in:
Czar.Echavez
2023-09-28 12:23:49 +01:00
parent c096d06bcd
commit 6202d320a6
8 changed files with 146 additions and 16 deletions

View File

@@ -25,6 +25,9 @@ class FTPServiceABC(Service, ABC):
:param: session_id: session ID linked to the FTP Packet. Optional.
:type: session_id: Optional[str]
"""
if payload.ftp_command is not None:
self.sys_log.info(f"Received FTP {payload.ftp_command.name} command.")
# handle STOR request
if payload.ftp_command == FTPCommand.STOR:
# check that the file is created in the computed hosting the FTP server
@@ -48,11 +51,7 @@ class FTPServiceABC(Service, ABC):
file_name = payload.ftp_command_args["dest_file_name"]
folder_name = payload.ftp_command_args["dest_folder_name"]
file_size = payload.ftp_command_args["file_size"]
self.file_system.create_file(
file_name=file_name,
folder_name=folder_name,
size=file_size,
)
self.file_system.create_file(file_name=file_name, folder_name=folder_name, size=file_size, real=True)
self.sys_log.info(
f"Created item in {self.sys_log.hostname}: {payload.ftp_command_args['dest_folder_name']}/"
f"{payload.ftp_command_args['dest_file_name']}"