@atolis-hq/wake 0.2.78 → 0.2.80
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.
|
@@ -46,6 +46,9 @@ function stripHeavyRunRecordFields(record) {
|
|
|
46
46
|
const { stdout: _stdout, stderr: _stderr, raw: _raw, ...restMetadata } = metadata;
|
|
47
47
|
return { ...rest, metadata: restMetadata };
|
|
48
48
|
}
|
|
49
|
+
function compareIssueStatesForListing(left, right) {
|
|
50
|
+
return left.workItemKey.localeCompare(right.workItemKey);
|
|
51
|
+
}
|
|
49
52
|
function parseRunRecordSummaryIndex(input, date) {
|
|
50
53
|
if (input === null || typeof input !== 'object') {
|
|
51
54
|
throw new Error('Run summary index must be an object');
|
|
@@ -670,7 +673,7 @@ export function createStateStore({ wakeRoot }) {
|
|
|
670
673
|
for (const item of items) {
|
|
671
674
|
byWorkItemKey.set(item.workItemKey, item);
|
|
672
675
|
}
|
|
673
|
-
return [...byWorkItemKey.values()].sort(
|
|
676
|
+
return [...byWorkItemKey.values()].sort(compareIssueStatesForListing);
|
|
674
677
|
},
|
|
675
678
|
async listEventEnvelopes() {
|
|
676
679
|
const eventsRoot = join(paths.dataRoot, 'events');
|
|
@@ -1094,7 +1094,9 @@ export function createTickRunner(deps) {
|
|
|
1094
1094
|
return null;
|
|
1095
1095
|
}
|
|
1096
1096
|
async function runRunnerTick() {
|
|
1097
|
-
const lock = await acquireFileLock(deps.stateStore.paths.runnerLockFile
|
|
1097
|
+
const lock = await acquireFileLock(deps.stateStore.paths.runnerLockFile, {
|
|
1098
|
+
staleAfterMs: Math.min(runnerTimeoutMs(), 5 * 60 * 1000),
|
|
1099
|
+
});
|
|
1098
1100
|
if (!lock.acquired) {
|
|
1099
1101
|
return { status: 'locked' };
|
|
1100
1102
|
}
|
package/dist/src/version.js
CHANGED