Skip to content

Commit

Permalink
use gevent sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaksymiv committed Jun 3, 2016
1 parent 273cde3 commit 11cb168
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions openprocurement/contracting/api/databridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
except ImportError:
pass

import time
import logging
import logging.config
import os
Expand Down Expand Up @@ -127,7 +126,7 @@ def get_tenders(self, params={}, direction=""):
extra={"TENDER_ID": tender['id']})

logger.info('Sleep {} sync...'.format(direction))
time.sleep(delay)
gevent.sleep(delay)
logger.info('Restore {} sync'.format(direction))
logger.debug('{} {}'.format(direction, params))
response = self.tenders_sync_client.sync_tenders(params, extra_headers={'X-Client-Request-ID': generate_req_id()})
Expand Down

0 comments on commit 11cb168

Please sign in to comment.