mirror of
https://github.com/hansjone/netx.git
synced 2026-10-16 23:51:54 +08:00
Dedupe if-intf/config_interface collects and allow idle manual collect.
Remap legacy if_intf items, skip duplicate CLI+metric work, hide aux command duplicates in the workbook, use profile titles for sheet tabs, sticky table headers, and let scheduled tasks trigger collect-now when idle. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
18a0c41196
commit
99cec1c324
7 changed files with 241 additions and 42 deletions
|
|
@ -193,10 +193,11 @@ def api_collect_now(
|
|||
raise HTTPException(status_code=404, detail="task not found")
|
||||
if bool(task.collect_running):
|
||||
return {"ok": True, "started": False, "reason": "already_collecting", "task_id": task_id}
|
||||
# Allow one-shot from draft/paused
|
||||
# Allow one-shot even when schedule is enabled (idle only).
|
||||
task.last_collect_ended_at = None
|
||||
db.commit()
|
||||
background_tasks.add_task(dispatch_collect, task_id)
|
||||
tid = task_id
|
||||
background_tasks.add_task(lambda: dispatch_collect(tid, manual=True))
|
||||
return {"ok": True, "started": True, "task_id": task_id}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue