Maj
Build & Deploy / build (push) Successful in 38s

This commit is contained in:
Mouigni
2026-08-19 13:42:31 +02:00
parent 742469b032
commit 272d14d623
3 changed files with 3 additions and 11 deletions
-1
View File
@@ -5,7 +5,6 @@ import os
DB_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "regwatch.db")
DATABASE_URL = os.getenv("DATABASE_URL", f"sqlite:///{DB_PATH}")
# check_same_thread est propre à SQLite : psycopg2 le rejette.
CONNECT_ARGS = {"check_same_thread": False} if DATABASE_URL.startswith("sqlite") else {}
engine = create_engine(
+2 -3
View File
@@ -20,11 +20,10 @@ class Document(Base):
pdf_url = Column(String, unique=True)
class ScraperRun(Base):
"""Une exécution de scraper, déclenchée depuis la page admin ou par le cron."""
__tablename__ = "scraper_runs"
id = Column(Integer, primary_key=True, index=True)
source = Column(String, index=True) # CIR | SCCS
status = Column(String, default="pending") # pending | running | success | error
source = Column(String, index=True)
status = Column(String, default="pending")
started_at = Column(DateTime(timezone=True))
finished_at = Column(DateTime(timezone=True), nullable=True)
documents_added = Column(Integer, default=0)