Add support for PostgresDB and save date as Date

This commit is contained in:
Jan Oberhauser
2019-07-22 20:29:06 +02:00
parent d027545986
commit a9453806b8
27 changed files with 310 additions and 73 deletions

View File

@@ -35,7 +35,7 @@ export class ActiveExecutions {
this.activeExecutions[executionId] = {
runExecutionData,
startedAt: new Date().getTime(),
startedAt: new Date(),
mode,
workflow,
postExecutePromises: [],

View File

@@ -47,7 +47,7 @@ export interface IExecuteSingleFunctions extends IExecuteSingleFunctionsBase {
export interface IExecutingWorkflowData {
runExecutionData: IRunExecutionData;
startedAt: number;
startedAt: Date;
mode: WorkflowExecuteMode;
workflow: Workflow;
postExecutePromises: Array<IDeferredPromise<IRun>>;
@@ -55,7 +55,7 @@ export interface IExecutingWorkflowData {
export interface IExecutionsCurrentSummary {
id: string;
startedAt: number;
startedAt: Date;
mode: WorkflowExecuteMode;
workflowId: string;
}

View File

@@ -66,8 +66,8 @@ export class LoadNodeParameterOptions {
active: false,
connections: {},
nodes: Object.values(this.workflow.nodes),
createdAt: 0,
updatedAt: 0,
createdAt: new Date(),
updatedAt: new Date(),
};
}

View File

@@ -623,8 +623,8 @@ export class WorkflowExecute {
const fullRunData: IRun = {
data: runExecutionData,
mode: this.mode,
startedAt,
stoppedAt: new Date().getTime(),
startedAt: new Date(startedAt),
stoppedAt: new Date(),
};
if (executionError !== undefined) {
@@ -643,8 +643,8 @@ export class WorkflowExecute {
const fullRunData: IRun = {
data: runExecutionData,
mode: this.mode,
startedAt,
stoppedAt: new Date().getTime(),
startedAt: new Date(startedAt),
stoppedAt: new Date(),
};
fullRunData.data.resultData.error = {

View File

@@ -50,7 +50,7 @@ describe('Credentials', () => {
{
nodeType: 'base.noOp',
user: 'userName',
date: 1234,
date: new Date(),
}
];