mirror of
https://github.com/hansjone/netx.git
synced 2026-10-16 15:23:21 +08:00
Add offline biz_state log import with unified create-task entry.
Create tasks via pick-NE or import log; re-import appends batches like collects, without inventory NE or SSH. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
7b5f03ad54
commit
d701e4a35e
13 changed files with 1991 additions and 139 deletions
|
|
@ -39,6 +39,13 @@ def enqueue_collect(task_id: str, *, manual: bool = False) -> dict[str, Any]:
|
|||
task = db.get(BizStateTask, tid)
|
||||
if not task:
|
||||
return {"ok": False, "queued": False, "reason": "task_not_found", "task_id": tid}
|
||||
if str(task.source or "").strip().lower() == "import":
|
||||
return {
|
||||
"ok": False,
|
||||
"queued": False,
|
||||
"reason": "import_offline_only",
|
||||
"task_id": tid,
|
||||
}
|
||||
if bool(task.collect_running):
|
||||
return {
|
||||
"ok": True,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue