@songsid/agend 2.3.0-beta.17 → 2.3.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fleet-manager.d.ts +2 -2
- package/dist/fleet-manager.js +19 -4
- package/dist/fleet-manager.js.map +1 -1
- package/dist/spawn-gate.d.ts +1 -0
- package/dist/spawn-gate.js +13 -3
- package/dist/spawn-gate.js.map +1 -1
- package/launcher/agend-install.cjs +10 -5
- package/package.json +1 -1
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -1265,8 +1265,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1265
1265
|
startPersistedPausedInstance(name: string, transition?: TransitionHandle): Promise<void>;
|
|
1266
1266
|
/**
|
|
1267
1267
|
* Start instances with configurable concurrency and stagger delay.
|
|
1268
|
-
* Instances sharing the same working_directory are serialized
|
|
1269
|
-
*
|
|
1268
|
+
* Instances sharing the same working_directory are serialized to avoid
|
|
1269
|
+
* config file races. Stagger applies between outer lifecycle admissions.
|
|
1270
1270
|
* TODO: per-instance startup timeout (existing issue, not introduced here)
|
|
1271
1271
|
*/
|
|
1272
1272
|
private startInstancesWithConcurrency;
|
package/dist/fleet-manager.js
CHANGED
|
@@ -4935,8 +4935,8 @@ export class FleetManager {
|
|
|
4935
4935
|
}
|
|
4936
4936
|
/**
|
|
4937
4937
|
* Start instances with configurable concurrency and stagger delay.
|
|
4938
|
-
* Instances sharing the same working_directory are serialized
|
|
4939
|
-
*
|
|
4938
|
+
* Instances sharing the same working_directory are serialized to avoid
|
|
4939
|
+
* config file races. Stagger applies between outer lifecycle admissions.
|
|
4940
4940
|
* TODO: per-instance startup timeout (existing issue, not introduced here)
|
|
4941
4941
|
*/
|
|
4942
4942
|
async startInstancesWithConcurrency(entries, topicMode, onReady) {
|
|
@@ -4958,15 +4958,30 @@ export class FleetManager {
|
|
|
4958
4958
|
totalInstances: runnableEntries.length,
|
|
4959
4959
|
}, "Adaptive startup concurrency");
|
|
4960
4960
|
}
|
|
4961
|
+
const startedAt = performance.now();
|
|
4962
|
+
let active = 0, peakConcurrentStarts = 0, readyInstances = 0;
|
|
4961
4963
|
await Promise.all(runnableEntries.map(([name, config]) => this.spawnGate.run({
|
|
4962
4964
|
instanceName: name,
|
|
4963
4965
|
workingDirectory: config.working_directory,
|
|
4964
4966
|
reason: "startup",
|
|
4965
4967
|
stage: "lifecycle",
|
|
4966
4968
|
}, async () => {
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
+
peakConcurrentStarts = Math.max(peakConcurrentStarts, ++active);
|
|
4970
|
+
try {
|
|
4971
|
+
if (await this.startInstanceUnattended(name, config, topicMode, "instance")) {
|
|
4972
|
+
readyInstances++;
|
|
4973
|
+
onReady?.(name);
|
|
4974
|
+
}
|
|
4975
|
+
}
|
|
4976
|
+
finally {
|
|
4977
|
+
active--;
|
|
4978
|
+
}
|
|
4969
4979
|
})));
|
|
4980
|
+
this.logger.info({
|
|
4981
|
+
totalInstances: runnableEntries.length, readyInstances,
|
|
4982
|
+
elapsedSeconds: Math.round((performance.now() - startedAt) / 100) / 10,
|
|
4983
|
+
peakConcurrentStarts,
|
|
4984
|
+
}, "Fleet startup batch completed");
|
|
4970
4985
|
}
|
|
4971
4986
|
/**
|
|
4972
4987
|
* Start from an UNATTENDED path (fleet startup, full restart, config
|