Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 495925b

Browse files
author
Samuel Hassine
committed
[connector_helper] Fix create queue of connectors
1 parent be32961 commit 495925b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pycti/opencti_connector_helper.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ def _create_channel(self):
6969
def _create_queue(self):
7070
if self.channel is not None:
7171
config_encoded = base64.b64encode(json.dumps(self.config).encode('utf-8')).decode('utf-8')
72-
check = self.channel.queue_declare(self.queue_name, durable=True, passive=True, arguments={'config': config_encoded})
73-
if not check:
72+
try:
73+
self.channel.queue_declare(self.queue_name, durable=True, passive=True, arguments={'config': config_encoded})
74+
except:
75+
self.channel = self._create_channel()
7476
self.channel.queue_delete(self.queue_name)
7577
self.channel.queue_declare(self.queue_name, durable=True, arguments={'config': config_encoded})
7678
self.channel.queue_bind(queue=self.queue_name, exchange=EXCHANGE_NAME, routing_key=self.routing_key)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
print("warning: pypandoc module not found, could not convert Markdown to RST")
1414
read_md = lambda f: open(f, 'r').read()
1515

16-
VERSION = "1.2.13"
16+
VERSION = "1.2.14"
1717

1818

1919
class VerifyVersionCommand(install):

0 commit comments

Comments
 (0)