From a4586e37b1e5301f2657ecae779fdbfd4cc6eb0b Mon Sep 17 00:00:00 2001 From: Jan Cizmar Date: Thu, 21 Dec 2023 15:15:41 +0100 Subject: [PATCH] fix: Run Invoice download async --- .../kotlin/io/tolgee/batch/state/BatchJobStateProvider.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/data/src/main/kotlin/io/tolgee/batch/state/BatchJobStateProvider.kt b/backend/data/src/main/kotlin/io/tolgee/batch/state/BatchJobStateProvider.kt index 4ce2107f7a..1f3b5fec8f 100644 --- a/backend/data/src/main/kotlin/io/tolgee/batch/state/BatchJobStateProvider.kt +++ b/backend/data/src/main/kotlin/io/tolgee/batch/state/BatchJobStateProvider.kt @@ -125,6 +125,9 @@ class BatchJobStateProvider( } fun getCachedJobIds(): MutableSet { - return getStatesMap().keys + val keys = getStatesMap().keys + // redisson defers the access to the key set, so it was throwing NoSuchElementException when iterating over keys + // so let's rather copy the set + return keys.toMutableSet() } }