From 61fe287cbe20206693ba2c200b896e132c0284e5 Mon Sep 17 00:00:00 2001 From: Alex Theimer Date: Fri, 3 Dec 2021 20:21:47 -0500 Subject: [PATCH] change to Akka scheduler --- .../filodb.coordinator/TenantIngestionMetering.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala b/coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala index 865e3cf125..a2d9c6c81c 100644 --- a/coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala +++ b/coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala @@ -6,11 +6,10 @@ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration.FiniteDuration import scala.util.{Failure, Success} -import akka.actor.ActorRef +import akka.actor.{ActorRef, ActorSystem} import com.typesafe.scalalogging.StrictLogging import kamon.Kamon import kamon.tag.TagSet -import monix.execution.Scheduler.{global => scheduler} import filodb.coordinator.client.Client import filodb.coordinator.client.QueryCommands.LogicalPlan2Query @@ -44,9 +43,10 @@ case class TenantIngestionMetering(settings: FilodbSettings, private val METRIC_TOTAL = "total_timeseries_by_tenant" def schedulePeriodicPublishJob() : Unit = { - scheduler.scheduleWithFixedDelay( + ActorSystem().scheduler.schedule( SCHED_INIT_DELAY, - SCHED_DELAY)(() => queryAndSchedulePublish()) + SCHED_DELAY, + () => queryAndSchedulePublish()) } /**