Archiv: Quellen und Arbeitsdateien fertiger Versionen auf ARCHIV_DIR auslagern (z. B. Storage Box)
Nach jedem fertigen Lauf und beim Start nachholend; QUELLEN.md bleibt. Löschen und Zurücksetzen räumen das Archiv mit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
478ce6b412
commit
be19abc065
9 files changed
+109
-2
No files matched your search
+4
-1
@@ -1,3 +1,4 @@
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
from contextlib import asynccontextmanager
|
||||
@@ -8,7 +9,7 @@ from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.middleware.gzip import GZipMiddleware
|
||||
from pydantic import BaseModel
|
||||
|
||||
from . import config, montage, pipeline, state
|
||||
from . import archiv, config, montage, pipeline, state
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s: %(message)s")
|
||||
|
||||
@@ -17,7 +18,9 @@ logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name
|
||||
async def lifespan(app: FastAPI):
|
||||
config.STORAGE.mkdir(exist_ok=True)
|
||||
state.migrieren()
|
||||
nachholen = asyncio.create_task(archiv.nachholen())
|
||||
yield
|
||||
nachholen.cancel()
|
||||
for name in list(pipeline._laeufe):
|
||||
await pipeline.pausieren(name)
|
||||
|
||||
|
||||
Reference in new issue
Block a user