refactor(core): Separate execution startedAt from createdAt (#10810)
This commit is contained in:
@@ -70,6 +70,7 @@ describe('ExecutionService', () => {
|
||||
mode: expect.any(String),
|
||||
retryOf: null,
|
||||
status: expect.any(String),
|
||||
createdAt: expect.any(String),
|
||||
startedAt: expect.any(String),
|
||||
stoppedAt: expect.any(String),
|
||||
waitTill: null,
|
||||
@@ -510,6 +511,7 @@ describe('ExecutionService', () => {
|
||||
mode: expect.any(String),
|
||||
retryOf: null,
|
||||
status: expect.any(String),
|
||||
createdAt: expect.any(String),
|
||||
startedAt: expect.any(String),
|
||||
stoppedAt: expect.any(String),
|
||||
waitTill: null,
|
||||
|
||||
@@ -159,6 +159,7 @@ test('should report credential in not recently executed workflow', async () => {
|
||||
const savedExecution = await Container.get(ExecutionRepository).save({
|
||||
finished: true,
|
||||
mode: 'manual',
|
||||
createdAt: date,
|
||||
startedAt: date,
|
||||
stoppedAt: date,
|
||||
workflowId: workflow.id,
|
||||
@@ -227,6 +228,7 @@ test('should not report credentials in recently executed workflow', async () =>
|
||||
const savedExecution = await Container.get(ExecutionRepository).save({
|
||||
finished: true,
|
||||
mode: 'manual',
|
||||
createdAt: date,
|
||||
startedAt: date,
|
||||
stoppedAt: date,
|
||||
workflowId: workflow.id,
|
||||
|
||||
@@ -39,6 +39,7 @@ export async function createExecution(
|
||||
const execution = await Container.get(ExecutionRepository).save({
|
||||
finished: finished ?? true,
|
||||
mode: mode ?? 'manual',
|
||||
createdAt: new Date(),
|
||||
startedAt: startedAt ?? new Date(),
|
||||
...(workflow !== undefined && { workflowId: workflow.id }),
|
||||
stoppedAt: stoppedAt ?? new Date(),
|
||||
|
||||
Reference in New Issue
Block a user