Skip to content

Commit

Permalink
Added Exception loggers on get_resource_items
Browse files Browse the repository at this point in the history
  • Loading branch information
ktarasz authored Jan 14, 2019
1 parent bee01fc commit 910d6c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openprocurement_client/resources/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,13 @@ def get_resource_items(self):
LOGGER.info('Stop check backward worker')
check_down_worker = False
else:
if not self.backward_worker.successful():
LOGGER.warning('Exception from forward_worker: {}'.format(repr(self.backward_worker.exception)))
self.restart_sync()
check_down_worker = True
if self.forward_worker.ready():
if not self.forward_worker.successful():
LOGGER.warning('Exception from forward_worker: {}'.format(repr(self.forward_worker.exception)))
self.restart_sync()
check_down_worker = True
while not self.queue.empty():
Expand Down

0 comments on commit 910d6c0

Please sign in to comment.