fix(scheduler): return TriggerDataItem
This commit is contained in:
@@ -154,23 +154,22 @@ export default {
|
|||||||
return cronTimes.everyDayExcludingWeekendsAt(parameters.hour as number);
|
return cronTimes.everyDayExcludingWeekendsAt(parameters.hour as number);
|
||||||
},
|
},
|
||||||
|
|
||||||
async run($: IGlobalVariable, startDateTime: Date) {
|
async run($: IGlobalVariable) {
|
||||||
const dateTime = DateTime.fromJSDate(startDateTime);
|
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
|
||||||
dateTime
|
|
||||||
) as IJSONValue;
|
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
|
||||||
},
|
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
const nextCronDateTime = getNextCronDateTime(
|
const nextCronDateTime = getNextCronDateTime(
|
||||||
this.getInterval($.step.parameters)
|
this.getInterval($.step.parameters)
|
||||||
);
|
);
|
||||||
|
const dateTime = DateTime.now();
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
||||||
nextCronDateTime
|
$.execution.testRun ? nextCronDateTime : dateTime
|
||||||
) as IJSONValue;
|
) as IJSONValue;
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
const dataItem = {
|
||||||
|
raw: dateTimeObjectRepresentation,
|
||||||
|
meta: {
|
||||||
|
internalId: dateTime.toMillis().toString(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return { data: [dataItem] };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -48,23 +48,22 @@ export default {
|
|||||||
return cronTimes.everyHourExcludingWeekends;
|
return cronTimes.everyHourExcludingWeekends;
|
||||||
},
|
},
|
||||||
|
|
||||||
async run($: IGlobalVariable, startDateTime: Date) {
|
async run($: IGlobalVariable) {
|
||||||
const dateTime = DateTime.fromJSDate(startDateTime);
|
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
|
||||||
dateTime
|
|
||||||
) as IJSONValue;
|
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
|
||||||
},
|
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
const nextCronDateTime = getNextCronDateTime(
|
const nextCronDateTime = getNextCronDateTime(
|
||||||
this.getInterval($.step.parameters)
|
this.getInterval($.step.parameters)
|
||||||
);
|
);
|
||||||
|
const dateTime = DateTime.now();
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
||||||
nextCronDateTime
|
$.execution.testRun ? nextCronDateTime : dateTime
|
||||||
) as IJSONValue;
|
) as IJSONValue;
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
const dataItem = {
|
||||||
|
raw: dateTimeObjectRepresentation,
|
||||||
|
meta: {
|
||||||
|
internalId: dateTime.toMillis().toString(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return { data: [dataItem] };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -270,23 +270,22 @@ export default {
|
|||||||
return interval;
|
return interval;
|
||||||
},
|
},
|
||||||
|
|
||||||
async run($: IGlobalVariable, startDateTime: Date) {
|
async run($: IGlobalVariable) {
|
||||||
const dateTime = DateTime.fromJSDate(startDateTime);
|
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
|
||||||
dateTime
|
|
||||||
) as IJSONValue;
|
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
|
||||||
},
|
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
const nextCronDateTime = getNextCronDateTime(
|
const nextCronDateTime = getNextCronDateTime(
|
||||||
this.getInterval($.step.parameters)
|
this.getInterval($.step.parameters)
|
||||||
);
|
);
|
||||||
|
const dateTime = DateTime.now();
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
||||||
nextCronDateTime
|
$.execution.testRun ? nextCronDateTime : dateTime
|
||||||
) as IJSONValue;
|
) as IJSONValue;
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
const dataItem = {
|
||||||
|
raw: dateTimeObjectRepresentation,
|
||||||
|
meta: {
|
||||||
|
internalId: dateTime.toMillis().toString(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return { data: [dataItem] };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -174,23 +174,22 @@ export default {
|
|||||||
return interval;
|
return interval;
|
||||||
},
|
},
|
||||||
|
|
||||||
async run($: IGlobalVariable, startDateTime: Date) {
|
async run($: IGlobalVariable) {
|
||||||
const dateTime = DateTime.fromJSDate(startDateTime);
|
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
|
||||||
dateTime
|
|
||||||
) as IJSONValue;
|
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
|
||||||
},
|
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
const nextCronDateTime = getNextCronDateTime(
|
const nextCronDateTime = getNextCronDateTime(
|
||||||
this.getInterval($.step.parameters)
|
this.getInterval($.step.parameters)
|
||||||
);
|
);
|
||||||
|
const dateTime = DateTime.now();
|
||||||
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
const dateTimeObjectRepresentation = getDateTimeObjectRepresentation(
|
||||||
nextCronDateTime
|
$.execution.testRun ? nextCronDateTime : dateTime
|
||||||
) as IJSONValue;
|
) as IJSONValue;
|
||||||
|
|
||||||
return { data: [dateTimeObjectRepresentation] };
|
const dataItem = {
|
||||||
|
raw: dateTimeObjectRepresentation,
|
||||||
|
meta: {
|
||||||
|
internalId: dateTime.toMillis().toString(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return { data: [dataItem] };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user