added bounded semphore
This commit is contained in:
1 parent
28eaa1d1df
commit
e89f5d8682
1 file changed
+6
-1
@@ -37,6 +37,10 @@ async def main():
|
||||
get_category_products,
|
||||
proxies,
|
||||
collection,
|
||||
headers={
|
||||
"origin": "https://www.samsung.com",
|
||||
"referer": "https://www.samsung.com/us/shop/offer-program/education/",
|
||||
},
|
||||
)
|
||||
LOGGER.info("tasks completed sleeping", extra={"delay": CYCLE_DELAY})
|
||||
await asyncio.sleep(CYCLE_DELAY)
|
||||
@@ -165,4 +169,5 @@ def extract_products(response: dict) -> list[Product]:
|
||||
return products
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in new issue
Block a user