global throttle things
This commit is contained in:
1 parent
8faf56f9ad
commit
1ba6f903d9
1 file changed
+7
-12
+7
-12
@@ -5,9 +5,6 @@ import asyncio
|
|||||||
import uuid
|
import uuid
|
||||||
import re
|
import re
|
||||||
from time import time
|
from time import time
|
||||||
import re
|
|
||||||
# we dont need no stinkin floats
|
|
||||||
time = int(time())
|
|
||||||
|
|
||||||
import db
|
import db
|
||||||
|
|
||||||
@@ -113,7 +110,9 @@ async def acat2id(cat_id: str):
|
|||||||
get_set_number(obj.get("item_data", {}).get("name", ""))
|
get_set_number(obj.get("item_data", {}).get("name", ""))
|
||||||
if re.findall(r"\d{5}", obj.get("item_data", {}).get("name", ""))
|
if re.findall(r"\d{5}", obj.get("item_data", {}).get("name", ""))
|
||||||
else None
|
else None
|
||||||
)
|
),
|
||||||
|
"updated_at": obj.get("updated_at"),
|
||||||
|
"version": obj.get("version"),
|
||||||
}
|
}
|
||||||
for obj in result_json.get("objects", [])
|
for obj in result_json.get("objects", [])
|
||||||
]
|
]
|
||||||
@@ -122,14 +121,10 @@ async def acat2id(cat_id: str):
|
|||||||
|
|
||||||
|
|
||||||
async def test() -> None:
|
async def test() -> None:
|
||||||
task = asyncio.create_task(acat2id(LEGO_CAT_ID)) # type: ignore
|
result = await acat2id(LEGO_CAT_ID) # type: ignore
|
||||||
await do_review()
|
print("OBJECTS IN LEGO CATEGORY:")
|
||||||
await asyncio.sleep(1) # Give the task some time to complete
|
for item in result:
|
||||||
result = await task
|
print(f"ID: {item['id']}, Name: {item['name']}, Updated: {item['updated_at']}")
|
||||||
#print("OBJECTS IN LEGO CATEGORY:")
|
|
||||||
#print(f"ID: {item['id']}, Name: {item['name']}")
|
|
||||||
return True
|
|
||||||
# pass
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in new issue
Block a user