fix: hide stale and effort-preset models without losing checks
Build and deploy / build-deploy (push) Waiting to run
Build and deploy / build-deploy (push) Waiting to run
This commit is contained in:
+5
-1
@@ -81,7 +81,11 @@ def _ensure_usage_columns(db: sqlite3.Connection):
|
||||
def run():
|
||||
db = sqlite3.connect(DB_PATH, check_same_thread=False)
|
||||
_ensure_usage_columns(db)
|
||||
models = [r[0] for r in db.execute("SELECT id FROM models").fetchall()]
|
||||
model_cols = [r[1] for r in db.execute("PRAGMA table_info(models)")]
|
||||
if "active" not in model_cols:
|
||||
db.execute("ALTER TABLE models ADD COLUMN active INTEGER NOT NULL DEFAULT 1")
|
||||
db.commit()
|
||||
models = [r[0] for r in db.execute("SELECT id FROM models WHERE active = 1").fetchall()]
|
||||
db.close()
|
||||
|
||||
print(f"[probe] checking {len(models)} models @ {datetime.now(timezone.utc).isoformat()}")
|
||||
|
||||
Reference in New Issue
Block a user