From 91bb48c66d3180b2cc19ed5d68d699829ae0cd35 Mon Sep 17 00:00:00 2001 From: "Pierre-Yves B." <10694593+PyvesB@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:25:14 +0200 Subject: [PATCH] Extract constant --- .../server/SolargraphStreamConnectionProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java index 9a06a3b..266471c 100644 --- a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java +++ b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java @@ -36,6 +36,7 @@ public class SolargraphStreamConnectionProvider extends ProcessStreamConnectionP private static final AtomicBoolean HAS_DISPLAYED_NOT_FOUND_WARNING = new AtomicBoolean(); private static final AtomicBoolean HAS_UPDATED_SOLARGRAPH = new AtomicBoolean(); + private static final Long SOLARGRAPH_UPDATE_DELAY = 30000L; public SolargraphStreamConnectionProvider() { super(getSolargraphCommand(), System.getProperty("user.dir")); @@ -57,7 +58,7 @@ public void start() throws IOException { } super.start(); if (UPDATE_GEM.getValue() && !HAS_UPDATED_SOLARGRAPH.getAndSet(true)) { - GemHelper.scheduleUpdate("Solargraph", 30000L, GEM_PATH); + GemHelper.scheduleUpdate("Solargraph", SOLARGRAPH_UPDATE_DELAY, GEM_PATH); } }