rewritten crap

This commit is contained in:
2025-05-11 08:05:28 +03:00
parent 2e3245c8f9
commit 3522c119da
3 changed files with 3 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ class OzonStocksSender(BaseStocksSender):
return SendStockStatus.SHOULD_RETRY
return SendStockStatus.ERROR
finally:
await response.close()
await session.close()
async def after_chunk_processed(self):
return await asyncio.sleep(80 / 100)

View File

@@ -41,6 +41,7 @@ class WildberriesStocksSender(BaseStocksSender):
self.remaining = int(headers.get('X-Ratelimit-Remaining', 0))
return SendStockStatus.SUCCESS
finally:
await response.close()
await session.close()
async def after_chunk_processed(self):
if self.remaining <= 0:

View File

@@ -40,6 +40,7 @@ class YandexmarketStocksSender(BaseStocksSender):
logging.error(f'[{self.updater.marketplace.id}]: {response_text}')
return SendStockStatus.ERROR
finally:
await response.close()
await session.close()
async def after_chunk_processed(self):