Nodes/ComfyUI-CustomNodePacks/C2C Farm Job History (Audit Log)
ComfyUI Node

C2C Farm Job History (Audit Log)

Your render farm's audit log, queried from inside the graph — who ran what, and who's hogging the queue

By Code2Collapse·Created 6 months ago·Updated a day ago· 52
C2C Farm Job History (Audit Log)
    • stats_json
    • jobs_table
    limit50
    user_filter
    project_filter

    Every render farm needs an answer to "who ran what, and why did it take three hours." C2C_JobHistory is the audit log half of the pack's C2C Farm subsystem, and it queries that history from a plain node. It reads the SQLite audit database the farm writes on every dispatch and returns two things: per-user/status statistics as JSON, and a recent-jobs table as a readable text block. Wire it to a display node and you've got "the farm was busy because she queued six jobs at priority 10" in one glance.

    It slots next to C2C_Submit (which dispatches the jobs) and C2C_ClusterStatus (which watches live capacity). The farm itself is a Tractor-style spooler: backends are full ComfyUI instances - LAN boxes, AKS pools, RunPod pods - and every submit lands in a local spool queue with the job's user, project, backend, priority, status, and duration recorded to disk.

    How it works

    The node asks the farm's audit database (renderfarm/logging/audit_db.py, an SQLite store) for rows, filtered by the optional user and project filters and capped at limit. It then formats two outputs: stats_json - the DB's aggregate stats (per-user and per-status breakdowns) as JSON - and jobs_table, a fixed-width text table with columns for job id, user, project, backend, priority, status, and duration in seconds.

    Two implementation details are worth knowing. The node only re-runs when the audit DB actually changes on disk - it checks the DB file's mtime in IS_CHANGED - so it won't hammer the disk with repeated queries while your graph sits idle. And it returns whatever rows exist: if nobody has submitted through C2C_Submit yet, you get an empty table, not an error.

    Inputs and outputs

    • limit (50) - how many recent jobs to include, up to 1000.
    • user_filter - empty for everyone, or a farm user name.
    • project_filter - empty for all projects, or a project tag.

    Outputs are stats_json (STRING) and jobs_table (STRING).

    Installing it

    Part of Code2Collapse/ComfyUI-CustomNodePacks. ComfyUI Manager → search "CustomNodePacks", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git
    

    Restart ComfyUI. The farm subsystem needs requests (and websocket-client for live progress); the renderfarm's own requirements file lists those plus optional cloud-storage SDKs. Nothing model-related here.

    Gotchas

    The big one is that this node is only as interesting as your farm's history - an empty table on a fresh install is expected, not a bug. It also queries your local audit DB, so on a multi-user setup it reflects what the spooler on this machine has seen, not a global view unless your architecture funnels everything through one brain node. And the two text outputs are designed to be read, not machine-parsed - stats_json is valid JSON for automation, but jobs_table is a human-facing fixed-width table. Use it as a dashboard widget and it'll tell you exactly who to blame for the queue backlog.

    CategoryMEC/RenderFarm

    Inputs (3)

    NameTypeDefaultDescription
    limitINT501–1000
    user_filterSTRINGEmpty = all users.
    project_filterSTRINGEmpty = all projects.

    Outputs (2)

    NameTypeDescription
    stats_jsonSTRING
    jobs_tableSTRING