From 10a51a836004af3a6d12a87b471c770d98424adb Mon Sep 17 00:00:00 2001 From: ansons Date: Sun, 17 Mar 2024 22:35:39 -0400 Subject: [PATCH] hack(grid-dual-access): force dual results to be reverted once broker with custom "flags" is deployed --- .../java/com/conveyal/r5/analyst/cluster/AnalysisWorker.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/conveyal/r5/analyst/cluster/AnalysisWorker.java b/src/main/java/com/conveyal/r5/analyst/cluster/AnalysisWorker.java index 2add61702..46bfed946 100644 --- a/src/main/java/com/conveyal/r5/analyst/cluster/AnalysisWorker.java +++ b/src/main/java/com/conveyal/r5/analyst/cluster/AnalysisWorker.java @@ -41,6 +41,7 @@ import java.util.Arrays; import java.util.List; import java.util.Random; +import java.util.Set; import java.util.UUID; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; @@ -407,6 +408,10 @@ protected void handleOneRegionalTask (RegionalTask task) throws Throwable { LOG.debug("Handling regional task {}", task.toString()); + // Force dual access results for grid (remove once broker has been relaunched to support custom flags) + LOG.info("Forcing dual access results"); + task.flags = Set.of("gridDualAccess"); + if (task.injectFault != null) { task.injectFault.considerShutdownOrException(task.taskId); if (task.injectFault.shouldDropTaskBeforeCompute(task.taskId)) {