Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/a256833163537375_fix_bug_create_…
Browse files Browse the repository at this point in the history
…tender'
  • Loading branch information
vmaksymiv committed Jan 30, 2017
2 parents 58b4003 + 7dc905d commit 8228741
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openprocurement/tender/competitivedialogue/databridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ def put_tender_stage2(self):
{"TENDER_ID": new_tender['dialogueID']}))
self.dialogs_stage2_retry_put_queue.put(new_tender)
except Exception, e:
logger.info("Exception, schedule retry for competitive dialogue id={0}".format(new_tender['dialogueID']),
extra=journal_context({"MESSAGE_ID": DATABRIDGE_RETRY_CREATE},
{"TENDER_ID": new_tender['dialogueID']}))
self.dialogs_stage2_retry_put_queue.put(new_tender)
logger.exception(e)
else:
logger.info("Successfully created tender stage2 id={} from competitive dialogue id={}".format(res['data']['id'], res['data']['dialogueID']),
Expand Down Expand Up @@ -665,6 +669,7 @@ def get_competitive_dialogue_backward(self):

def catch_exception(self, exc, name):
"""Restarting job"""
logger.warning('Worker died! Restarting {}.'.format(name), extra=journal_context({"MESSAGE_ID": DATABRIDGE_WORKER_DIED}, {}))
if name == 'get_competitive_dialogue_data':
tender = self.competitive_dialogues_queue.get() # delete invalid tender from queue
logger.info('Remove invalid tender {}'.format(tender.id))
Expand Down

0 comments on commit 8228741

Please sign in to comment.