Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

fix: Add function to stop the defaultWorker #1272

Merged
merged 2 commits into from Feb 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions stats/view/worker.go
Expand Up @@ -221,6 +221,11 @@ func SetReportingPeriod(d time.Duration) {
defaultWorker.SetReportingPeriod(d)
}

// Stop stops the default worker.
func Stop() {
defaultWorker.Stop()
}

// SetReportingPeriod sets the interval between reporting aggregated views in
// the program. If duration is less than or equal to zero, it enables the
// default behavior.
Expand Down