Skip to content

Commit 1c9dc98

Browse files
authored
fix (JobScheduler): Replace mutable.Map with concurrent.Map for runningDags (#804)
Closes #804
1 parent 7001ca9 commit 1c9dc98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/za/co/absa/hyperdrive/trigger/scheduler/JobScheduler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import za.co.absa.hyperdrive.trigger.scheduler.executors.Executors
2727
import za.co.absa.hyperdrive.trigger.scheduler.notifications.NotificationSender
2828
import za.co.absa.hyperdrive.trigger.scheduler.sensors.Sensors
2929

30-
import scala.collection.mutable
30+
import scala.collection.concurrent.{Map => ConcurrentMap, TrieMap}
3131
import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
3232
import scala.util.{Failure, Success}
3333

@@ -57,7 +57,7 @@ class JobScheduler @Inject() (
5757
private var runningEnqueue = Future.successful((): Unit)
5858
private var runningAssignWorkflows = Future.successful((): Unit)
5959
private var runningSendingNotifications = Future.successful((): Unit)
60-
private val runningDags = mutable.Map.empty[RunningDagsKey, Future[Unit]]
60+
private val runningDags: ConcurrentMap[RunningDagsKey, Future[Unit]] = TrieMap.empty
6161

6262
def startManager(): Unit = {
6363
logger.info("Starting Manager")

0 commit comments

Comments
 (0)