@saturn-universe/projections 0.1.2-dev.10 → 0.1.2-dev.11
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/team.js +10 -11
- package/package.json +2 -2
package/dist/team.js
CHANGED
|
@@ -99,14 +99,12 @@ export function planTeam(s, e, run) {
|
|
|
99
99
|
};
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
const incomingConcurrency = team.concurrency
|
|
103
|
-
? teamConcurrency(team)
|
|
104
|
-
: (current?.concurrency ?? teamConcurrency(team));
|
|
102
|
+
const incomingConcurrency = resolveEffectiveTeamConcurrency(team.concurrency, mainMembership.config);
|
|
105
103
|
const mergedConcurrency = asyncCoordinator && current ? Math.max(current.concurrency, incomingConcurrency) : incomingConcurrency;
|
|
106
|
-
const cappedConcurrency = resolveEffectiveTeamConcurrency(
|
|
104
|
+
const cappedConcurrency = resolveEffectiveTeamConcurrency(mergedConcurrency, mainMembership.config);
|
|
107
105
|
s.teams[runId] = {
|
|
108
106
|
runId,
|
|
109
|
-
concurrency:
|
|
107
|
+
concurrency: cappedConcurrency,
|
|
110
108
|
members: [mainMember, ...(current?.members.slice(1) ?? [])],
|
|
111
109
|
tasks: [
|
|
112
110
|
...historicalTasks,
|
|
@@ -197,12 +195,13 @@ export function attachTeamMember(s, m) {
|
|
|
197
195
|
const tasksMatch = asyncCoordinator
|
|
198
196
|
? expectedTasks.every((expected) => currentTasks.some((cur) => cur.memberId === expected.memberId && cur.task === expected.task))
|
|
199
197
|
: canonicalJson(expectedTasks) === canonicalJson(currentTasks);
|
|
200
|
-
const concurrency =
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
198
|
+
const concurrency = resolveEffectiveTeamConcurrency(config.concurrency, rootConfig);
|
|
199
|
+
// Legacy attachments with an explicit request must also fit the projected limit before capping.
|
|
200
|
+
const legacyRequestExceedsLimit = rootConfig.teamDefaultConcurrency === undefined &&
|
|
201
|
+
config.concurrency !== undefined &&
|
|
202
|
+
config.concurrency > current.concurrency;
|
|
203
|
+
const concurrencyValid = !legacyRequestExceedsLimit &&
|
|
204
|
+
(asyncCoordinator ? concurrency <= current.concurrency : concurrency === current.concurrency);
|
|
206
205
|
if (!worker ||
|
|
207
206
|
!concurrencyValid ||
|
|
208
207
|
!tasksMatch ||
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saturn-universe/projections",
|
|
3
|
-
"version": "0.1.2-dev.
|
|
3
|
+
"version": "0.1.2-dev.11",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@saturn-universe/core": "0.1.2-dev.
|
|
10
|
+
"@saturn-universe/core": "0.1.2-dev.11"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|