From 11c10b0472a191e467573f2eecad06487172014f Mon Sep 17 00:00:00 2001 From: Tom Coufal <7453394+tumido@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:02:43 +0100 Subject: [PATCH] fix: add default 3scale schedule (#969) Signed-off-by: Tomas Coufal --- plugins/3scale-backend/src/dynamic/alpha.ts | 4 ++++ plugins/3scale-backend/src/dynamic/index.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/plugins/3scale-backend/src/dynamic/alpha.ts b/plugins/3scale-backend/src/dynamic/alpha.ts index ef7e8077e0..10ea73d016 100644 --- a/plugins/3scale-backend/src/dynamic/alpha.ts +++ b/plugins/3scale-backend/src/dynamic/alpha.ts @@ -27,6 +27,10 @@ export const dynamicPluginInstaller: BackendDynamicPluginInstaller = { ThreeScaleApiEntityProvider.fromConfig(config, { logger: loggerToWinstonLogger(logger), scheduler: scheduler, + schedule: scheduler.createScheduledTaskRunner({ + frequency: { minutes: 1 }, + timeout: { minutes: 1 }, + }), }), ); }, diff --git a/plugins/3scale-backend/src/dynamic/index.ts b/plugins/3scale-backend/src/dynamic/index.ts index 4c2856f5a5..229b5d5303 100644 --- a/plugins/3scale-backend/src/dynamic/index.ts +++ b/plugins/3scale-backend/src/dynamic/index.ts @@ -9,6 +9,10 @@ export const dynamicPluginInstaller: BackendDynamicPluginInstaller = { ThreeScaleApiEntityProvider.fromConfig(env.config, { logger: env.logger, scheduler: env.scheduler, + schedule: env.scheduler.createScheduledTaskRunner({ + frequency: { minutes: 1 }, + timeout: { minutes: 1 }, + }), }), ); },