task

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package task holds the background tasks run by the scheduler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityPurge

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

ActivityPurge trims the activity journal down to its configured cap. It is the only guard on the table size, so it is scheduled rather than left to a manual command, though the command exists for ops.

func NewActivityPurge

func NewActivityPurge(ctx *appContext.Context, activity service.ActivityService) *ActivityPurge

func (*ActivityPurge) Interval

func (t *ActivityPurge) Interval() time.Duration

func (*ActivityPurge) Name

func (t *ActivityPurge) Name() string

func (*ActivityPurge) Run

func (t *ActivityPurge) Run(ctx context.Context) error

func (*ActivityPurge) RunOnStart

func (t *ActivityPurge) RunOnStart() bool

RunOnStart trims once at boot: an instance that was down while events piled up should not wait a full interval to catch up.

func (*ActivityPurge) Timeout

func (t *ActivityPurge) Timeout() time.Duration

Jump to

Keyboard shortcuts

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