a0a57035019e9e8393dd605658f5deffaf90583a,studio/rabbit_queue.py,RMQueue,_delete_queue,#RMQueue#,125

Before Change


        which will also unbind and purge it.
        
        if self._queue_deleted:
            self._logger.info("Queue {0} is already deleted.".format(self._queue))
            return
        with self._rmq_lock:
            if not self._channel_is_valid():

After Change


        which will also unbind and purge it.
        Retry operation if necessary for fixed number of times.
        
        num_retries = 5
        retries_cnt = num_retries
        go_on = True
        while retries_cnt > 0 and go_on:
            self._logger.info("Trying to delete queue {0} retries left: {1}"
                              .format(self._queue, retries_cnt))
            self._delete_queue_attempt()
            go_on = not self._queue_deleted
            retries_cnt -= 1

        if not self._queue_deleted:
            self._logger.info("FAILED to delete queue {0} after {1} retries. IGNORING."
                              .format(self._queue, num_retries))

    def on_connection_open(self, unused_connection):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: studioml/studio
Commit Name: a0a57035019e9e8393dd605658f5deffaf90583a
Time: 2020-04-29
Author: andrei.denissov@cognizant.com
File Name: studio/rabbit_queue.py
Class Name: RMQueue
Method Name: _delete_queue


Project Name: pyprob/pyprob
Commit Name: 6f1f7bb0dc12f1272595a3c73312fde907a76313
Time: 2017-11-30
Author: webmaster@tobiaskohn.ch
File Name: pyprob/state.py
Class Name:
Method Name: extract_address


Project Name: pyprob/pyprob
Commit Name: 6aac747a8d9a55ca91d6408fee9a386289720a8e
Time: 2017-11-28
Author: webmaster@tobiaskohn.ch
File Name: pyprob/state.py
Class Name:
Method Name: extract_address