Skip to content
Snippets Groups Projects
Commit 4dcf7868 authored by sveseli's avatar sveseli
Browse files

logging changes

parent 355aac09
No related branches found
No related tags found
No related merge requests found
__version__ = "0.15 (2016.10.26)"
__version__ = "0.15 (2016.10.31)"
......@@ -32,13 +32,16 @@ class FileProcessingThread(threading.Thread):
try:
statusMonitor = fileInfo.get('statusMonitor')
if statusMonitor and statusMonitor.get('status') == dmProcessingStatus.DM_PROCESSING_STATUS_ABORTING:
statusMonitorId = ''
if statusMonitor and statusMonitor.get('status') == dmProcessingStatus.DM_PROCESSING_STATUS_ABORTING:
self.logger.debug('File %s processing is cancelled' % (filePath))
endProcessingTime = time.time()
statusMonitor.fileProcessingCancelled(filePath, endProcessingTime)
statusMonitor.updateStatus()
return
self.logger.debug('Starting to process file %s' % filePath)
if statusMonitor:
statusMonitorId = statusMonitor.get('id', '')
self.logger.debug('Starting to process file %s (upload or DAQ id: %s)' % (filePath, statusMonitorId))
startProcessingTime = fileInfo.get('startProcessingTime', time.time())
fileInfo['startProcessingTime'] = startProcessingTime
nProcessors = len(self.fileProcessorKeyList)
......@@ -64,11 +67,13 @@ class FileProcessingThread(threading.Thread):
processedByDict[processorName] = True
self.logger.debug('%s processed file at path %s ' % (processorName, filePath))
if processorNumber == nProcessors:
self.logger.debug('File %s processing is complete' % (filePath))
endProcessingTime = time.time()
self.logger.debug('File %s processing is complete (upload or DAQ id: %s)' % (filePath, statusMonitorId))
if statusMonitor:
statusMonitor.fileProcessed(filePath, endProcessingTime)
statusMonitor.updateStatus()
nProcessedFiles = statusMonitor.get('nProcessedFiles', 0)
self.logger.debug('Upload or DAQ id %s has processed %s files so far)' % (statusMonitorId, nProcessedFiles))
except Exception, ex:
self.logger.exception(ex)
processingError = '%s processing error: %s' % (processorName, str(ex))
......
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