feat: improve batch task controls and release 1.2.0
This commit is contained in:
1 parent
0e13bb5c29
commit
84e183d28d
38 files changed
+632
-147
No files matched your search
@@ -108,7 +108,7 @@ export class AgentService {
|
||||
const pendingMatch = pendingById.get(s.session_id);
|
||||
const isCurrentActive = ((status === 'running' || status === 'paused') && runId === s.session_id)
|
||||
|| !!activeMatch;
|
||||
const isTerminal = s.status === 'completed' || s.status === 'success' || s.status === 'failed' || s.status === 'cancelled';
|
||||
const isTerminal = ['completed', 'success', 'failed', 'cancelled', 'interrupted', 'skipped'].includes(s.status || '');
|
||||
let sStatus = s.status;
|
||||
if (!isTerminal) {
|
||||
const isPending = !!pendingMatch && !isCurrentActive;
|
||||
@@ -1515,12 +1515,12 @@ export class AgentService {
|
||||
return; // Paused while the tab is in the background; resumed by visibilitychange.
|
||||
}
|
||||
this.fetchStatus();
|
||||
const selected = this.currentSessionId();
|
||||
if (selected) this.fetchGuidance(selected);
|
||||
this.pollCounter++;
|
||||
// Periodically refresh sessions every 6 seconds (every 3 polling intervals of 2s) to stay in sync with external DB modifications
|
||||
if (this.pollCounter % 3 === 0) {
|
||||
this.fetchSessions();
|
||||
const selected = this.currentSessionId();
|
||||
if (selected) this.fetchGuidance(selected);
|
||||
}
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user