Skip to content

Commit

Permalink
fix: pass wrong interval seconds when GetRandSleepMilliSec for target…
Browse files Browse the repository at this point in the history
… scheduler
  • Loading branch information
catdogpandas committed Sep 19, 2024
1 parent 96afc79 commit b3d72b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/prometheus/schedulers/TargetSubscriberScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ TargetSubscriberScheduler::BuildScrapeSchedulerSet(std::vector<Labels>& targetGr
scrapeScheduler->SetTimer(mTimer);

auto randSleepMilliSec = GetRandSleepMilliSec(
scrapeScheduler->GetId(), prometheus::RefeshIntervalSeconds, GetCurrentTimeInMilliSeconds());
scrapeScheduler->GetId(), mScrapeConfigPtr->mScrapeIntervalSeconds, GetCurrentTimeInMilliSeconds());
auto firstExecTime = std::chrono::steady_clock::now() + std::chrono::milliseconds(randSleepMilliSec);
scrapeScheduler->SetFirstExecTime(firstExecTime);

Expand Down

0 comments on commit b3d72b5

Please sign in to comment.