Skip to content

Commit

Permalink
xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmajoor committed Mar 26, 2024
1 parent 65058f3 commit 13f804c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binder/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_websocket_channel(force_new=False):
if force_new:
try:
channels.get(pid).close()
except ChannelWrongStateError:
except pika.exceptions.ChannelWrongStateError:
channels[pid] = None

connection_credentials = pika.PlainCredentials(settings.HIGH_TEMPLAR['rabbitmq']['username'],
Expand All @@ -60,6 +60,7 @@ def get_websocket_channel(force_new=False):


def _trigger_rabbitmq(data, rooms, tries=2):
import pika
try:
channel = get_websocket_channel()
channel.basic_publish('hightemplar', routing_key='*', body=jsondumps({
Expand Down

0 comments on commit 13f804c

Please sign in to comment.