feat: parse project metadata from PF links
All checks were successful
CI / hygiene (push) Successful in 2s
Build and Deploy / build-and-deploy (push) Successful in 38s
CI / go (push) Successful in 26s
CI / python (push) Successful in 16s

This commit is contained in:
Grendgi
2026-06-24 14:03:25 +03:00
parent 31c498af39
commit 6750722429
7 changed files with 276 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ from app.models import Project
from app.services.monitor import (
BAYUT_ENABLED,
add_competitor_url,
notify_project_changes,
parse_our_listing_url,
run_check_all,
run_check_for_project,
sync_permit_competitors,
@@ -133,6 +135,14 @@ def cmd_suggest(payload: dict[str, Any]) -> None:
db.close()
def cmd_parse_own_listing(payload: dict[str, Any]) -> None:
url = str(payload.get("url") or "")
try:
_write(parse_our_listing_url(url))
except ValueError as exc:
_fail(str(exc))
def cmd_health(_: dict[str, Any]) -> None:
db = SessionLocal()
try:
@@ -149,6 +159,7 @@ COMMANDS = {
"check-project": cmd_check_project,
"check-all": cmd_check_all,
"suggest": cmd_suggest,
"parse-own-listing": cmd_parse_own_listing,
}