From 1ba6f903d9e3ccaca6b3e5b79e39c6f3dec307e8 Mon Sep 17 00:00:00 2001 From: C <0xicl33n@gmail.com> Date: Sun, 12 Oct 2025 11:52:04 -0700 Subject: [PATCH] global throttle things --- src/asquare.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/asquare.py b/src/asquare.py index 6241c88..1f12e2d 100644 --- a/src/asquare.py +++ b/src/asquare.py @@ -5,9 +5,6 @@ import asyncio import uuid import re from time import time -import re -# we dont need no stinkin floats -time = int(time()) import db @@ -113,7 +110,9 @@ async def acat2id(cat_id: str): get_set_number(obj.get("item_data", {}).get("name", "")) if re.findall(r"\d{5}", obj.get("item_data", {}).get("name", "")) else None - ) + ), + "updated_at": obj.get("updated_at"), + "version": obj.get("version"), } for obj in result_json.get("objects", []) ] @@ -122,14 +121,10 @@ async def acat2id(cat_id: str): async def test() -> None: - task = asyncio.create_task(acat2id(LEGO_CAT_ID)) # type: ignore - await do_review() - await asyncio.sleep(1) # Give the task some time to complete - result = await task - #print("OBJECTS IN LEGO CATEGORY:") - #print(f"ID: {item['id']}, Name: {item['name']}") - return True - # pass + result = await acat2id(LEGO_CAT_ID) # type: ignore + print("OBJECTS IN LEGO CATEGORY:") + for item in result: + print(f"ID: {item['id']}, Name: {item['name']}, Updated: {item['updated_at']}") """