Skip to content

Commit

Permalink
Remove postToAMQ (post_to_amq) and fix typo in doc_type_amq
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Apr 25, 2023
1 parent 0f27526 commit 77b06cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/python/WMCore/MicroService/MSPileup/MSPileupMonitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def __init__(self, msConfig=None):
"""
self.userAMQ = msConfig.get('user_amq', None)
self.passAMQ = msConfig.get('pass_amq', None)
self.postToAMQ = msConfig.get('post_to_amq', False)
self.topicAMQ = msConfig.get('topic_amq', None)
self.docTypeAMQ = msConfig.get('doc_type_amg', 'cms-ms-pileup')
self.docTypeAMQ = msConfig.get('doc_type_amq', 'cms-ms-pileup')
self.hostPortAMQ = msConfig.get('host_port_amq', None)
self.producer = msConfig.get('producer', 'cms-ms-pileup')
self.logger = msConfig.get('logger', getMSLogger(False))
Expand Down Expand Up @@ -103,7 +102,7 @@ def uploadToAMQ(self, docs, producer=None):
msg = "%i out of %i documents successfully sent to AMQ" % (len(notifications) - len(failures),
len(notifications))
self.logger.info(msg)
return {"success": len(notifications)-len(failures), "failures": len(failures)}
return {"success": len(notifications) - len(failures), "failures": len(failures)}
except Exception as ex:
self.logger.exception("Failed to send data to StompAMQ. Error %s", str(ex))
return {}

0 comments on commit 77b06cc

Please sign in to comment.