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