v1.0
This commit is contained in:
@@ -45,6 +45,7 @@ class YandexmarketMarketplaceApi(BaseMarketplaceApi):
|
||||
chunks = chunk_list(data, max_stocks)
|
||||
if not chunks:
|
||||
return
|
||||
self.init_session()
|
||||
limiter = BatchLimiter()
|
||||
|
||||
async def send_stock_chunk(chunk):
|
||||
@@ -71,6 +72,8 @@ class YandexmarketMarketplaceApi(BaseMarketplaceApi):
|
||||
first_response = await first_request
|
||||
if not first_response:
|
||||
logging.error(f'Skipping marketplace [{self.marketplace.id}] because first request was unsuccessful')
|
||||
await self.session.close()
|
||||
return
|
||||
|
||||
await asyncio.gather(*tasks[1:])
|
||||
await self.session.close()
|
||||
|
||||
Reference in New Issue
Block a user