From 76ef775835fe4be920c734590b8e7678d35c2a0f Mon Sep 17 00:00:00 2001 From: Martin Lowe <martin.lowe@eclipse-foundation.org> Date: Wed, 8 Nov 2023 15:48:18 -0500 Subject: [PATCH] Iss #152 - Add a minute delay to installation scan to resolve race con There seems to be a race condition present in the startup of how things are loaded/registered. An easy fix for this is to simply put a delay. Should this crop up again, we could add a more expensive fix that would check if the provider is registered, and if not add it on the fly. --- .../git/eca/tasks/GithubInstallationUpdateTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java index 30c431fe..5c0a131e 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java +++ b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java @@ -81,7 +81,7 @@ public class GithubInstallationUpdateTask { * Every 1h, this method will query Github for installations for the currently configured application. These * installations will be translated into database entries for a persistent cache to be loaded on request. */ - @Scheduled(every = "1h") + @Scheduled(every = "1h", delay = 1) @ActivateRequestContext public void revalidate() { // if not enabled, don't process any potentially OOD records -- GitLab