Expose ComfyUI run time on Enhance jobs as run_ms
Parse execution_start vs the end event from /history, store it when the poller moves a job to ready/failed (never overwritten with null), and return it as "run_ms" on every job endpoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c7d810b812
commit
47ab6b3c00
9 files changed
+106
-4
No files matched your search
@@ -361,6 +361,7 @@ impl EnhanceService {
|
||||
discarded: 0,
|
||||
created_at: now,
|
||||
updated_at: now,
|
||||
run_ms: None,
|
||||
};
|
||||
self.dao
|
||||
.lock()
|
||||
@@ -520,6 +521,7 @@ impl EnhanceService {
|
||||
.error
|
||||
.unwrap_or_else(|| "ComfyUI reported an error".to_string()),
|
||||
);
|
||||
u.run_ms = entry.run_ms;
|
||||
self.update_job(&job.id, &u);
|
||||
return;
|
||||
}
|
||||
@@ -531,6 +533,7 @@ impl EnhanceService {
|
||||
}
|
||||
let mut u = JobUpdate::status(STATUS_READY);
|
||||
u.pending = serde_json::to_string(&entry.staged).ok();
|
||||
u.run_ms = entry.run_ms;
|
||||
self.update_job(&job.id, &u);
|
||||
info!(
|
||||
"enhance: job {} ready ({} result(s))",
|
||||
|
||||
Reference in new issue
Block a user