feat: ability to reset marketplace
This commit is contained in:
@@ -132,3 +132,11 @@ class StocksUpdater:
|
||||
for marketplace_id, marketplace_updates in updates_list:
|
||||
tasks.append(self.update_marketplace(marketplace_id, marketplace_updates))
|
||||
await asyncio.gather(*tasks)
|
||||
|
||||
async def reset_marketplace(self, marketplace_id:int):
|
||||
marketplace = await self.get_marketplace(marketplace_id)
|
||||
start = time.time()
|
||||
updater = UpdaterFactory.get_updater(self.session,marketplace)
|
||||
await updater.reset()
|
||||
logging.info(
|
||||
f"{marketplace.name} successfully updated in {round(time.time() - start, 2)} seconds.")
|
||||
|
||||
Reference in New Issue
Block a user