#371 Make a stomp connection to always disconnect regardless of errors
Merged 4 years ago by vmaljulin. Opened 4 years ago by vmaljulin.
vmaljulin/waiverdb FACTORY-5042  into  master

file modified
+4 -2
@@ -93,8 +93,10 @@ 

          conn = stomp.Connection(**configs['connection'])

          conn.start()

          conn.connect(**configs.get('credentials', {}))

-         yield conn

-         conn.disconnect()

+         try:

+             yield conn

+         finally:

+             conn.disconnect()

      else:

          raise RuntimeError('stomp was configured to publish messages, '

                             'but STOMP_CONFIGS is not configured')

This fixes #352

Signed-off-by: Valerij Maljulin vmaljuli@redhat.com

Build 8cb89bedc7eb58da296a58a771cf7546da9dcaba FAILED!
Rebase or make new commits to rebuild.

I think you can leave this out and just have try: ... finally: ....

rebased onto 5c44101

4 years ago

+1 It looks like Jenkins did not notice the change.

Pull-Request has been merged by vmaljulin

4 years ago