refactor: Extract processor job into separate background jobs

This commit is contained in:
Faruk AYDIN
2022-10-13 18:45:01 +02:00
parent 3c3bb82e97
commit 56a9aeece7
17 changed files with 374 additions and 213 deletions

View File

@@ -204,6 +204,7 @@ export interface ITrigger {
key: string;
pollInterval: number;
description: string;
dedupeStrategy: 'greatest' | 'unique' | 'last';
substeps: ISubstep[];
getInterval(parameters: IGlobalVariable['step']['parameters']): string;
run($: IGlobalVariable): Promise<ITriggerOutput>;
@@ -252,12 +253,25 @@ export type IGlobalVariable = {
};
app: IApp;
http: IHttpClient;
flow: {
flow?: {
id: string;
lastInternalId: string;
isAlreadyProcessed?: (internalId: string) => boolean;
};
step: {
step?: {
id: string;
appKey: string;
parameters: IJSONObject;
};
nextStep?: {
id: string;
appKey: string;
parameters: IJSONObject;
};
execution?: {
id: string;
}
process?: (triggerDataItem: ITriggerDataItem) => Promise<void>;
};
declare module 'axios' {