housekeeping

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package housekeeping provides automated maintenance tasks for the Lunar system.

The scheduler runs hourly to delete old execution logs based on function retention settings. Functions can specify retention periods of 7, 15, 30, or 365 days (default is 7 days).

Usage:

scheduler := housekeeping.NewScheduler(db)
scheduler.Start()
defer scheduler.Stop()

Index

Constants

View Source
const (
	// DefaultRetentionDays is the default retention period when not specified
	DefaultRetentionDays = 7
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler manages periodic cleanup of old executions

func NewScheduler

func NewScheduler(db store.DB) *Scheduler

NewScheduler creates a new housekeeping scheduler

func (*Scheduler) Start

func (s *Scheduler) Start() error

Start begins the housekeeping scheduler Runs cleanup every hour at the top of the hour

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Stop stops the housekeeping scheduler

Jump to

Keyboard shortcuts

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