Skip to content

Commit

Permalink
latest alan's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mapellidario committed Dec 17, 2024
1 parent 1c7ca8c commit 2dd6799
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/python/WMCore/MicroService/MSOutput/MSOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def msOutputConsumer(self):
wfCounters += 1
try:
pipeLine.run(docOut)
wfCountersOk += 1
except (KeyError, TypeError) as ex:
msg = "%s Possibly malformed record in MongoDB. Err: %s. " % (pipeLineName, str(ex))
msg += "Continue to the next document."
Expand All @@ -547,9 +548,8 @@ def msOutputConsumer(self):
workflowname = docOut.get("_id", "")
self.alertGenericError(self.mode, workflowname, msg, str(ex), str(docOut))
continue
wfCountersOk += 1
self.logger.info("Processed %d workflows from pipeline: %s", wfCountersOk, pipeLineName)
self.logger.info("Failes to proccess %d workflows from pipeline: %s", wfCounters - wfCountersOk, pipeLineName)
self.logger.info("Successfully processed %d workflows from pipeline: %s", wfCountersOk, pipeLineName)
self.logger.info("Failed to proccess %d workflows from pipeline: %s", wfCounters - wfCountersOk, pipeLineName)
wfCounterTotal += wfCountersOk

return wfCounterTotal
Expand Down Expand Up @@ -589,6 +589,7 @@ def msOutputProducer(self, requestRecords):
pipeLineName = msPipeline.getPipelineName()
try:
msPipeline.run(request)
counterOk += 1
except (KeyError, TypeError) as ex:
msg = "%s Possibly broken read from ReqMgr2 API or other. Err: %s." % (pipeLineName, str(ex))
msg += " Continue to the next document."
Expand All @@ -601,7 +602,6 @@ def msOutputProducer(self, requestRecords):
workflowname = request.get("_id", "")
self.alertGenericError(self.mode, workflowname, msg, str(ex), str(request))
continue
counterOk += 1
return counterOk

def docTransformer(self, doc):
Expand Down

0 comments on commit 2dd6799

Please sign in to comment.