fix(tasks): preserve timestamps when listing (#1198)

Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
This commit is contained in:
Isaac Sanchez-Hawkins
2026-05-12 11:10:56 +03:00
committed by GitHub
co-authored by Isaac Sanchez
parent 51356b4195
commit 1f6cea50ed
2 changed files with 34 additions and 1 deletions
@@ -270,6 +270,7 @@ const normalizeTaskForStorage = (value, options) => {
createId,
existingTask,
allowCreate,
refreshUpdatedAt = true,
} = options;
if (!value || typeof value !== 'object') {
@@ -307,7 +308,7 @@ const normalizeTaskForStorage = (value, options) => {
const state = {
...baseState,
createdAt: existingTask?.state?.createdAt ?? baseState.createdAt ?? nowMs,
updatedAt: nowMs,
updatedAt: refreshUpdatedAt ? nowMs : baseState.updatedAt ?? nowMs,
};
return {
@@ -386,6 +387,7 @@ export const createProjectConfigRuntime = (deps) => {
createId: taskIDFactory,
existingTask: null,
allowCreate: true,
refreshUpdatedAt: false,
});
scheduledTasks.push(normalized);
} catch {