cron

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package cron is a Temporal worker that implements recurring internal maintenance tasks (e.g. cleanups, 3rd-party event watch renewals, etc.).

In a normal state, Temporal will have: 1 available worker PER connected AutoKitteh server, but ONLY 1 named schedule that triggers the main workflow, which runs a few child workflows (1 per task), which run multiple activities (1 per relevant connection).

Child workflows run in parallel, so they don't block each other. However, activities run sequentially per child workflow, so they won't overwhelm 3rd-party services and constrained resources that they access.

Note that even in the worst case (a child workflow fails or gets terminated by the next invocation), successful activities won't need to run again, so congestions will be resolved eventually no matter what.

Index

Constants

This section is empty.

Variables

View Source
var (
	Configs = configset.Set[Config]{
		Default: &Config{},
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Worker   temporalclient.WorkerConfig   `koanf:"worker"`
	Workflow temporalclient.WorkflowConfig `koanf:"workflow"`
	Activity temporalclient.ActivityConfig `koanf:"activity"`
}

type Cron

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

func New

func New(c *Config, l *zap.Logger, t temporalclient.Client) *Cron

func (*Cron) Start

Jump to

Keyboard shortcuts

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