Skip to content

Commit da10ee1

Browse files
committed
fix: avoid publishing to rmq only if it's RabbitMQ QA App - refs #260161
1 parent 0a65084 commit da10ee1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Products/Reportek/EnvelopeInstance.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
from Products.Reportek.constants import DEFAULT_CATALOG
5050
from Products.Reportek.exceptions import ApplicationException
5151
from Products.Reportek.rabbitmq import queue_msg
52+
from Products.Reportek.RemoteRabbitMQQAApplication import (
53+
RemoteRabbitMQQAApplication,
54+
)
5255
from Products.Reportek.RepUtils import getToolByName
5356

5457
try:
@@ -1114,7 +1117,11 @@ def manageWorkitemCreation(self, workitem_id):
11141117
self.wf_status = activity.get_wf_status()
11151118
self.reindexObject()
11161119
self.startAutomaticApplication(workitem_id)
1117-
if rmq and not activity.getId().startswith("AutomaticQA"):
1120+
application_url = self.getApplicationUrl(workitem_id)
1121+
application = self.restrictedTraverse(application_url)
1122+
if rmq and not isinstance(
1123+
application, RemoteRabbitMQQAApplication
1124+
):
11181125
queue_msg(
11191126
"{}|{}".format(
11201127
self.absolute_url(), self.get_freq(workitem_id)

0 commit comments

Comments
 (0)