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): ...@@ -47,11 +47,11 @@ class GridftpFileTransferPlugin(FileTransferPlugin):
# Original data directory may contain host/port # Original data directory may contain host/port
(scheme, host, port, replacementDirPath) = FtpUtility.parseFtpUrl(dataDirectory) (scheme, host, port, replacementDirPath) = FtpUtility.parseFtpUrl(dataDirectory)
ftpUtility = SftpUtility(storageHost) ftpUtility = SftpUtility(storageHost)
self.logger.debug("STORAGE DIR: %s", storageDirectory) self.logger.debug("SVDBG STORAGE DIR: %s", storageDirectory)
self.logger.debug("STORAGE HOST: %s", storageHost) self.logger.debug("SVDBG STORAGE HOST: %s", storageHost)
storageFilePathsDict = ftpUtility.getFiles(storageDirectory, {}, replacementDirPath) storageFilePathsDict = ftpUtility.getFiles(storageDirectory, {}, replacementDirPath)
self.logger.debug("STORAGE PATHS: %s", storageFilePathsDict) self.logger.debug("SVDBG STORAGE PATHS: %s", storageFilePathsDict)
self.logger.debug("ORIG PATHS: %s", filePathsDict) self.logger.debug("SVDB ORIG PATHS: %s", filePathsDict)
pluginFilePathsDict = {} pluginFilePathsDict = {}
filePaths = filePathsDict.keys() filePaths = filePathsDict.keys()
for filePath in filePaths: for filePath in filePaths:
...@@ -59,10 +59,11 @@ class GridftpFileTransferPlugin(FileTransferPlugin): ...@@ -59,10 +59,11 @@ class GridftpFileTransferPlugin(FileTransferPlugin):
experimentFilePath = os.path.relpath(filePath, dataDirectory) experimentFilePath = os.path.relpath(filePath, dataDirectory)
storageFilePath = os.path.join(storageDirectory, experimentFilePath) storageFilePath = os.path.join(storageDirectory, experimentFilePath)
storageFilePathDict = storageFilePathsDict.get(storageFilePath) storageFilePathDict = storageFilePathsDict.get(storageFilePath)
self.logger.debug("SRC: %s", filePathDict) self.logger.debug("SVDBG SRC: %s", filePathDict)
self.logger.debug("DEST: %s", storageFilePathDict) self.logger.debug("SVDBG DEST: %s", storageFilePathDict)
if not storageFilePathDict: if not storageFilePathDict:
self.logger.debug("SVDBG STORAGE HAS NO SUCH FILE: %s", filePathDict)
# remote directory does not have the file # remote directory does not have the file
pluginFilePathsDict[filePath] = filePathDict pluginFilePathsDict[filePath] = filePathDict
else: else:
...@@ -70,12 +71,14 @@ class GridftpFileTransferPlugin(FileTransferPlugin): ...@@ -70,12 +71,14 @@ class GridftpFileTransferPlugin(FileTransferPlugin):
sfSize = storageFilePathDict.get('fileSize') sfSize = storageFilePathDict.get('fileSize')
# check size # check size
if not fSize or not sfSize or fSize != sfSize: if not fSize or not sfSize or fSize != sfSize:
self.logger.debug("SVDBG SIZES DO NOT MATCH: %s", filePathDict)
pluginFilePathsDict[filePath] = filePathDict pluginFilePathsDict[filePath] = filePathDict
else: else:
# sizes are the same, check modify time # sizes are the same, check modify time
mTime = filePathDict.get('fileModificationTime') mTime = filePathDict.get('fileModificationTime')
sfTime = storageFilePathDict.get('fileModificationTime') smTime = storageFilePathDict.get('fileModificationTime')
if not mTime or not sfTime or mTime > sfTime: if not mTime or not smTime or mTime > smTime:
self.logger.debug("SVDBG TIMES DO NOT MATCH: %s", filePathDict)
pluginFilePathsDict[filePath] = filePathDict pluginFilePathsDict[filePath] = filePathDict
self.logger.debug('Number of original files: %s, number of plugin files: %s', len(filePathsDict), len(pluginFilePathsDict)) 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