Skip to content

Commit

Permalink
change to Akka scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
alextheimer committed Dec 4, 2021
1 parent 64fa4ac commit 61fe287
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())
}

/**
Expand Down

0 comments on commit 61fe287

Please sign in to comment.