perf: streamline repository and deployment awareness
ForgeFlow quality gate / quality (push) Canceled after 0s

This commit is contained in:
NuklearRabbit
2026-08-12 15:26:53 +02:00
parent 38e221cbd1
commit 32ed4fcb5e
19 changed files with 351 additions and 73 deletions
+8 -1
View File
@@ -328,8 +328,15 @@ class DeploymentService {
async refreshActiveOperations() {
const active = this.store.data.operations.filter((item) => item.type === 'deployment' && !TERMINAL_STATUSES.has(item.status));
const queue = active.slice(0, 20);
const results = [];
for (const operation of active.slice(0, 20)) results.push(await this.refreshOperation(operation.id));
const workers = Array.from({ length: Math.min(4, queue.length) }, async () => {
while (queue.length) {
const operation = queue.shift();
results.push(await this.refreshOperation(operation.id));
}
});
await Promise.all(workers);
return results;
}