From 624bbf5f942eafa3c0fbd378f60a676b4a75bcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Garv=C3=A3o?= <100000464+MatheusGarvao@users.noreply.github.com> Date: Tue, 4 Apr 2023 20:03:45 -0300 Subject: [PATCH] Update EarlybirdWireModule.java - Fix sintax problems improve readability --- .../search/earlybird/factory/EarlybirdWireModule.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/com/twitter/search/earlybird/factory/EarlybirdWireModule.java b/src/java/com/twitter/search/earlybird/factory/EarlybirdWireModule.java index a6b67e021..6039e954a 100644 --- a/src/java/com/twitter/search/earlybird/factory/EarlybirdWireModule.java +++ b/src/java/com/twitter/search/earlybird/factory/EarlybirdWireModule.java @@ -422,8 +422,8 @@ public class EarlybirdWireModule { public ScoringModelsManager provideScoringModelsManager( SearchStatsReceiver serverStats, EarlybirdIndexConfig earlybirdIndexConfig) { - boolean modelsEnabled = EarlybirdConfig.getBool("scoring_models_enabled", false); - if (!modelsEnabled) { + boolean modelsDisabled = !EarlybirdConfig.getBool("scoring_models_enabled", false); + if (modelsDisabled) { LOG.info("Scoring Models - Disabled in the config. Not loading any models."); serverStats.getCounter("scoring_models_disabled_in_config").increment(); return ScoringModelsManager.NO_OP_MANAGER; @@ -450,9 +450,9 @@ public class EarlybirdWireModule { Decider decider, EarlybirdIndexConfig earlybirdIndexConfig) { - boolean modelsEnabled = EarlybirdProperty.TF_MODELS_ENABLED.get(false); + boolean modelsDisabled = !EarlybirdProperty.TF_MODELS_ENABLED.get(false); - if (!modelsEnabled) { + if (modelsDisabled) { LOG.info("Tensorflow Models - Disabled in the config. Not loading any models."); serverStats.getCounter("tf_models_disabled_in_config").increment(); return TensorflowModelsManager.createNoOp(statsPrefix);