Add a delay to the fact retrievers to prevent errors

Signed-off-by: Leon <leonvanginneken@gmail.com>
This commit is contained in:
Leon
2022-10-06 11:47:12 +02:00
parent 32aa6532bf
commit 0cf317ee37
@@ -126,6 +126,9 @@ export class DefaultFactRetrieverEngine implements FactRetrieverEngine {
frequency: { cron: cronExpression },
fn: this.createFactRetrieverHandler(factRetriever, lifecycle),
timeout: timeLimit,
// We add a delay in order to prevent errors due to the
// fact that the backend is not yet online in a cold-start scenario
initialDelay: Duration.fromObject({ seconds: 5 }),
});
newRegs.push(factRetriever.id);
} catch (e) {