SHARE
TWEET

Untitled

a guest Jul 16th, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def restart(self):
  2.     restart_all_messages = not self.filters
  3.     while True:
  4.         if not restart_all_messages and not self.filters:
  5.             return
  6.  
  7.         messages = self._retrieve_messages()
  8.         if not messages:
  9.             return
  10.  
  11.         if not restart_all_messages:
  12.             messages = self._filter_messages(messages)
  13.             self.filters = [id for id in self.filters if id not in [msg.id for msg in messages]]
  14.            
  15.         send_sqs_message_batch(messages, self.queue_url)
  16.         delete_sqs_message_batch(messages, self.dlt_queue_url)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top