taskqueue

package
v1.21.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTaskExpired

func IsTaskExpired(t *persistencespb.AllocatedTaskInfo) bool

TODO https://github.com/temporalio/temporal/issues/1021

there should be more validation logic here
1. if task has valid TTL -> TTL reached -> delete
2. if task has 0 TTL / no TTL -> logic need to additionally check if corresponding workflow still exists

Types

type Scavenger

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

Scavenger is the type that holds the state for task queue scavenger daemon

func NewScavenger

func NewScavenger(db p.TaskManager, metricsHandler metrics.Handler, logger log.Logger) *Scavenger

NewScavenger returns an instance of executorTask queue scavenger daemon The Scavenger can be started by calling the Start() method on the returned object. Calling the Start() method will result in one complete iteration over all of the task queues in the system. For each task queue, the scavenger will attempt

  • deletion of expired tasks in the task queues
  • deletion of task queue itself, if there are no tasks and the task queue hasn't been updated for a grace period

The scavenger will retry on all persistence errors infinitely and will only stop under two conditions

  • either all task queues are processed successfully (or)
  • Stop() method is called to stop the scavenger

func (*Scavenger) Alive

func (s *Scavenger) Alive() bool

Alive returns true if the scavenger is still running

func (*Scavenger) Start

func (s *Scavenger) Start()

Start starts the scavenger

func (*Scavenger) Stop

func (s *Scavenger) Stop()

Stop stops the scavenger

Jump to

Keyboard shortcuts

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