mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix lint.
This commit is contained in:
@@ -23,8 +23,7 @@ export default class Queue {
|
||||
queueName: QueueName,
|
||||
jobId: string
|
||||
): Promise<void> {
|
||||
|
||||
if(!jobId){
|
||||
if (!jobId) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,8 +158,8 @@ export default class RunWorkflow {
|
||||
if (didWorkflowTimeOut) {
|
||||
throw new TimeoutException(
|
||||
'Workflow execution time was more than ' +
|
||||
runProps.timeout +
|
||||
'ms and workflow timed-out.'
|
||||
runProps.timeout +
|
||||
'ms and workflow timed-out.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ export default class RunWorkflow {
|
||||
if (componentsExecuted.includes(executeComponentId)) {
|
||||
throw new BadDataException(
|
||||
'Cyclic Workflow Detected. Cannot execute ' +
|
||||
executeComponentId +
|
||||
' when it has already been executed.'
|
||||
executeComponentId +
|
||||
' when it has already been executed.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -186,8 +186,8 @@ export default class RunWorkflow {
|
||||
if (!stackItem) {
|
||||
throw new BadDataException(
|
||||
'Component with ID ' +
|
||||
executeComponentId +
|
||||
' not found.'
|
||||
executeComponentId +
|
||||
' not found.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ export default class RunWorkflow {
|
||||
this.log(result.returnValues);
|
||||
this.log(
|
||||
'Executing Port: ' + result.executePort?.title ||
|
||||
'<None>'
|
||||
'<None>'
|
||||
);
|
||||
|
||||
storageMap.local.components[stackItem.node.id] = {
|
||||
@@ -387,29 +387,29 @@ export default class RunWorkflow {
|
||||
argumentContent.toString().includes('{{') &&
|
||||
argumentContent.toString().includes('}}')
|
||||
) {
|
||||
let argumentContentCopy: string = argumentContent.toString();
|
||||
const variablesInArgument: Array<string> = [];
|
||||
|
||||
const regex: RegExp = /{{(.*?)}}/g; // Find all matches of the regular expression and capture the word between the braces {{x}} => x
|
||||
|
||||
|
||||
let argumentContentCopy = argumentContent.toString();
|
||||
const variablesInArgument = [];
|
||||
|
||||
const regex = /{{(.*?)}}/g // Find all matches of the regular expression and capture the word between the braces {{x}} => x
|
||||
|
||||
|
||||
let match;
|
||||
let match: RegExpExecArray | null = null;
|
||||
|
||||
while ((match = regex.exec(argumentContentCopy)) !== null) {
|
||||
variablesInArgument.push(match[1]);
|
||||
if (match[1]) {
|
||||
variablesInArgument.push(match[1]);
|
||||
}
|
||||
}
|
||||
|
||||
for(const variable of variablesInArgument){
|
||||
|
||||
const value = deepFind(
|
||||
for (const variable of variablesInArgument) {
|
||||
const value: string = deepFind(
|
||||
storageMap as any,
|
||||
variable as any
|
||||
);
|
||||
|
||||
argumentContentCopy = argumentContentCopy.replace("{{"+variable+"}}", value);
|
||||
argumentContentCopy = argumentContentCopy.replace(
|
||||
'{{' + variable + '}}',
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
argumentContent = argumentContentCopy;
|
||||
@@ -531,8 +531,8 @@ export default class RunWorkflow {
|
||||
} else {
|
||||
this.logs.push(
|
||||
OneUptimeDate.getCurrentDateAsFormattedString() +
|
||||
': ' +
|
||||
JSON.stringify(data)
|
||||
': ' +
|
||||
JSON.stringify(data)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -606,7 +606,7 @@ export default class RunWorkflow {
|
||||
const trigger: any | undefined = nodes.find((n: any) => {
|
||||
return (
|
||||
(n.data as NodeDataProp).componentType ===
|
||||
ComponentType.Trigger &&
|
||||
ComponentType.Trigger &&
|
||||
(n.data as NodeDataProp).nodeType === NodeType.Node
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user