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