diff --git a/src/python/WMCore/MicroService/MSOutput/MSOutput.py b/src/python/WMCore/MicroService/MSOutput/MSOutput.py index a1b906be5e..0b31215177 100644 --- a/src/python/WMCore/MicroService/MSOutput/MSOutput.py +++ b/src/python/WMCore/MicroService/MSOutput/MSOutput.py @@ -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." @@ -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 @@ -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." @@ -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):