wtf is going on with these imports man
This commit is contained in:
1 parent
e9d2bef2ae
commit
77db374418
3 files changed
+20
-15
No files matched your search
+2
-1
@@ -9,7 +9,8 @@ import aiohttp
|
||||
import json
|
||||
import dotenv
|
||||
from typing import Dict, Any
|
||||
from asyncio_throttle.throttler import Throttler
|
||||
from . import throttler
|
||||
Throttler = throttler.GlobalThrottler
|
||||
|
||||
dotenv.load_dotenv()
|
||||
|
||||
|
||||
+2
-2
@@ -6,9 +6,9 @@ import uuid
|
||||
import re
|
||||
from time import time
|
||||
|
||||
import db
|
||||
from . import db
|
||||
|
||||
import get_sq_env
|
||||
from . import get_sq_env
|
||||
|
||||
|
||||
def get_set_number(text: str) -> int:
|
||||
|
||||
+16
-12
@@ -1,14 +1,16 @@
|
||||
import asyncio
|
||||
import json
|
||||
import re
|
||||
import get_sq_env
|
||||
from . import get_sq_env
|
||||
import aiosqlite
|
||||
from time import time
|
||||
|
||||
import asquare
|
||||
import db
|
||||
import abricksetapi
|
||||
from throttler import GlobalThrottler
|
||||
from . import asquare
|
||||
from . import db
|
||||
from . import abricksetapi
|
||||
from . import throttler
|
||||
Throttler = throttler.GlobalThrottler
|
||||
|
||||
|
||||
LEGO_CAT_ID = get_sq_env.LEGO_CAT_ID
|
||||
|
||||
@@ -19,7 +21,7 @@ async def do_review() -> bool:
|
||||
if not re.match(r".*\d{5}.*", item["name"]):
|
||||
missing = []
|
||||
print(f"{item} is missing its set number!")
|
||||
print(f"[@DEBUG] Upserting {item['id']} into REVIEW table")
|
||||
#print(f"[@DEBUG] Upserting {item['id']} into REVIEW table")
|
||||
item_sanitized = {
|
||||
"sq_object": item["id"],
|
||||
"set_name": item["name"],
|
||||
@@ -27,11 +29,13 @@ async def do_review() -> bool:
|
||||
"time_added": time
|
||||
}
|
||||
missing.append(item_sanitized)
|
||||
|
||||
for item in missing:
|
||||
sq_item = await db.fetch(item["id"]) #
|
||||
print(item)
|
||||
# sq_item = await db.fetch(item["id"])
|
||||
if item["id"] != sq_item["sq_object"]:
|
||||
await db.upsert("REVIEW", item_sanitized, "sq_object")
|
||||
print(f"[@DEBUG] Upserted {item['id']} into REVIEW table")
|
||||
print(f"[@DEBUG] {item['id']} already in REVIEW table")
|
||||
return True
|
||||
|
||||
print(f"[@DEBUG] {item['id']} is missing)")
|
||||
#await db.upsert("MISSING", item_sanitized, "sq_object")
|
||||
# #print(f"[@DEBUG] Upserted {item['id']} into REVIEW table")
|
||||
#print(f"[@DEBUG] {item['id']} already in REVIEW table")
|
||||
return True
|
||||
Reference in new issue
Block a user