Skip to content
Snippets Groups Projects
Commit 3b24b63e authored by sveseli's avatar sveseli
Browse files

dbug statements

parent de9f5eba
No related branches found
No related tags found
No related merge requests found
......@@ -47,11 +47,11 @@ class GridftpFileTransferPlugin(FileTransferPlugin):
# Original data directory may contain host/port
(scheme, host, port, replacementDirPath) = FtpUtility.parseFtpUrl(dataDirectory)
ftpUtility = SftpUtility(storageHost)
self.logger.debug("STORAGE DIR: %s", storageDirectory)
self.logger.debug("STORAGE HOST: %s", storageHost)
self.logger.debug("SVDBG STORAGE DIR: %s", storageDirectory)
self.logger.debug("SVDBG STORAGE HOST: %s", storageHost)
storageFilePathsDict = ftpUtility.getFiles(storageDirectory, {}, replacementDirPath)
self.logger.debug("STORAGE PATHS: %s", storageFilePathsDict)
self.logger.debug("ORIG PATHS: %s", filePathsDict)
self.logger.debug("SVDBG STORAGE PATHS: %s", storageFilePathsDict)
self.logger.debug("SVDB ORIG PATHS: %s", filePathsDict)
pluginFilePathsDict = {}
filePaths = filePathsDict.keys()
for filePath in filePaths:
......@@ -59,10 +59,11 @@ class GridftpFileTransferPlugin(FileTransferPlugin):
experimentFilePath = os.path.relpath(filePath, dataDirectory)
storageFilePath = os.path.join(storageDirectory, experimentFilePath)
storageFilePathDict = storageFilePathsDict.get(storageFilePath)
self.logger.debug("SRC: %s", filePathDict)
self.logger.debug("DEST: %s", storageFilePathDict)
self.logger.debug("SVDBG SRC: %s", filePathDict)
self.logger.debug("SVDBG DEST: %s", storageFilePathDict)
if not storageFilePathDict:
self.logger.debug("SVDBG STORAGE HAS NO SUCH FILE: %s", filePathDict)
# remote directory does not have the file
pluginFilePathsDict[filePath] = filePathDict
else:
......@@ -70,12 +71,14 @@ class GridftpFileTransferPlugin(FileTransferPlugin):
sfSize = storageFilePathDict.get('fileSize')
# check size
if not fSize or not sfSize or fSize != sfSize:
self.logger.debug("SVDBG SIZES DO NOT MATCH: %s", filePathDict)
pluginFilePathsDict[filePath] = filePathDict
else:
# sizes are the same, check modify time
mTime = filePathDict.get('fileModificationTime')
sfTime = storageFilePathDict.get('fileModificationTime')
if not mTime or not sfTime or mTime > sfTime:
smTime = storageFilePathDict.get('fileModificationTime')
if not mTime or not smTime or mTime > smTime:
self.logger.debug("SVDBG TIMES DO NOT MATCH: %s", filePathDict)
pluginFilePathsDict[filePath] = filePathDict
self.logger.debug('Number of original files: %s, number of plugin files: %s', len(filePathsDict), len(pluginFilePathsDict))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment