global throttle things

This commit is contained in:
C committed 2025-10-12 11:52:04 -07:00
1 parent 8faf56f9ad
commit 1ba6f903d9
1 file changed
+7 -12
+7 -12
View File
@@ -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']}")
"""