Пример #1
0
 def __exit__(self, exc_type, value, tb):
     if exc_type is not None:
         del self._repeated_field[len(self._repeated_field) - 1]
         logger.exception(
             'Exception occurred while attempting to populate a repeated field:'
         )
     return True
Пример #2
0
 def __exit__(self, exc_type, value, tb):
     del self._repeated_field[len(self._repeated_field) - 1]
     if exc_type is not None and exc_type is not ProtocolBufferRollbackExpected:
         logger.exception(
             'Exception occurred while attempting to populate a repeated field:'
         )
     return True
Пример #3
0
 def _send_view_updates(self):
     journal = self.journal
     if journal.entries:
         ops = list(journal.entries)
         journal.clear()
         try:
             while self.client is not None:
                 self._send_view_updates_for_client(self.client, ops)
         except:
             logger.exception('Error sending view updates to client!')
     self._pending_creates.clear()
 def _send_view_updates(self):
     journal = self.journal
     if journal.entries:
         ops = list(journal.entries)
         journal.clear()
         try:
             for distributor in self.client_distributors:
                 distributor._send_view_updates_for_client(
                     distributor.client, ops)
         except:
             logger.exception('Error sending view updates to client!')
     self._pending_creates.clear()
Пример #5
0
 def __exit__(self, exc_type, value, tb):
     if exc_type is not None:
         del self._repeated_field[len(self._repeated_field) - 1]
         logger.exception('Exception occurred while attempting to populate a repeated field:')
     return True