provozni zaloha

This commit is contained in:
lachtan
2026-06-24 08:11:12 +02:00
parent 9295dba19f
commit 1db3ec4756
97 changed files with 7698 additions and 817 deletions

View File

@@ -10,6 +10,8 @@ TASKS = WORKSPACE / "tasks"
CONFIG = Path.home() / ".nanobot" / "config.json"
LOG = WORKSPACE / "log" / "detach.log"
QUEUE_DIRS = ("new", "inbox", "running", "done", "failed")
FILENAME_RE = re.compile(
r"^(\d{4}-\d{2}-\d{2}(?:T\d{6}|_\d{2}_\d{2}_\d{2}_\d{6}))-(.+)\.md$"
)
@@ -20,6 +22,11 @@ _NO_INTERACTION_BULLET = (
)
def ensure_queue_dirs() -> None:
for name in QUEUE_DIRS:
(TASKS / name).mkdir(parents=True, exist_ok=True)
def log(msg: str) -> None:
LOG.parent.mkdir(parents=True, exist_ok=True)
with LOG.open("a") as f: