projectbwcleanup

package
v1.104.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chore

type Chore struct {
	Loop *sync2.Cycle
	// contains filtered or unexported fields
}

Chore to remove unused project bandwidth rollups.

architecture: Chore

func NewChore

func NewChore(log *zap.Logger, db accounting.ProjectAccounting, config Config) *Chore

NewChore creates new chore for removing unused project bandwidth rollups.

func (*Chore) Close

func (chore *Chore) Close() error

Close stops the chore.

func (*Chore) Run

func (chore *Chore) Run(ctx context.Context) (err error)

Run starts the chore.

func (*Chore) RunOnce

func (chore *Chore) RunOnce(ctx context.Context) (err error)

RunOnce removes unused project bandwidth rollups.

type Config

type Config struct {
	Interval     time.Duration `help:"how often to remove unused project bandwidth rollups" default:"24h" testDefault:"$TESTINTERVAL"`
	RetainMonths int           `help:"number of months of project bandwidth rollups to retain, not including the current month" default:"2"`
}

Config is a configuration struct for the Chore.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL