Commit efab5239 authored by Manuela Kuhn's avatar Manuela Kuhn

Merge branch 'hotfix-2.1.3'

parents b84794d2 583e4bc9
# API to communicate with a data transfer unit
__version__ = '2.1.2'
__version__ = '2.1.3'
import zmq
import socket
......
......@@ -93,10 +93,17 @@ def getMetadata (log, metadata, chunkSize, localTarget = None):
def sendData (log, targets, sourceFile, targetFile, metadata, openConnections, context, prop):
if not targets:
prop["removeFlag"] = False
targets_data = [i for i in targets if i[2] == "data"]
if not targets_data:
prop["removeFlag"] = True
return
chunkSize = metadata[ "chunkSize" ]
chunkNumber = 0
sendError = False
#reading source file into memory
try:
log.debug("Opening '" + str(sourceFile) + "'...")
......@@ -131,14 +138,13 @@ def sendData (log, targets, sourceFile, targetFile, metadata, openConnections, c
except:
log.error("Unable to pack multipart-message for file " + str(sourceFile), exc_info=True)
if targets_data:
#send message to data targets
try:
__sendToTargets(log, targets_data, sourceFile, targetFile, openConnections, None, chunkPayload, context)
log.debug("Passing multipart-message for file " + str(sourceFile) + " (chunk " + str(chunkNumber) + ")...done.")
#send message to data targets
try:
__sendToTargets(log, targets_data, sourceFile, targetFile, openConnections, None, chunkPayload, context)
log.debug("Passing multipart-message for file " + str(sourceFile) + " (chunk " + str(chunkNumber) + ")...done.")
except:
log.error("Unable to send multipart-message for file " + str(sourceFile) + " (chunk " + str(chunkNumber) + ")", exc_info=True)
except:
log.error("Unable to send multipart-message for file " + str(sourceFile) + " (chunk " + str(chunkNumber) + ")", exc_info=True)
chunkNumber += 1
......
__version__ = '2.1.2'
__version__ = '2.1.3'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment