mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-10-19 14:07:16 +02:00
fix(web): detect orphaned runs stuck in 'running' state in detail endpoint
This commit is contained in:
1 parent
4699d40ea9
commit
48d3b61aed
1 file changed
+4
@@ -787,6 +787,10 @@ async function runDetail(id) {
|
||||
flows: exists('flows.jsonl'),
|
||||
deliverables: await listTree(path.join(dir, 'deliverables'), 'deliverables'),
|
||||
};
|
||||
if (status.state === 'running') {
|
||||
const liveRunIds = new Set([...jobs.values()].filter((j) => !j.done && j.runId).map((j) => j.runId));
|
||||
if (!liveRunIds.has(id)) status.state = 'interrupted';
|
||||
}
|
||||
return { id, name: engagementNames.get(id) || '', meta, status, findings, assets, pocs, extras };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user