openrun

package
v1.140.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package openrun is the refusal a script set to run one at a time answers with (#1986): the open run a new run of the script collides with, the error that names it, and the words a skipped fire's reason and a refused run both use. It is its own package so pkg/script's public surface does not carry it; the store raises it and the tool and the portal read it.

Index

Constants

View Source
const BlockedMessage = "more than one run of this script is open, so it cannot be set to run one at a time yet; " +
	"wait for them to finish or cancel all but one, then save again"

BlockedMessage is the refusal of a save turning exclusive on while more than one run of the script is open: the index would hold neither of them to the setting, so the save waits until at most one is.

Variables

View Source
var ErrOpen = errors.New("another run of this script is still open")

ErrOpen marks a run refused because its script is exclusive and another of its runs is still open. The typed Error carrying the open run wraps it, so a caller matches on the sentinel and names the run from the rest.

Functions

This section is empty.

Types

type Error

type Error struct {
	Open Run
}

Error is one refused run of an exclusive script.

func (*Error) Error

func (e *Error) Error() string

Error names the open run and what the caller can do about it.

func (*Error) Unwrap

func (*Error) Unwrap() error

Unwrap lets errors.Is match the sentinel.

type Run

type Run struct {
	ID        string
	Trigger   string
	Status    string
	StartedAt *time.Time
	CreatedAt time.Time
}

Run is the run an exclusive script is waiting on: enough for the caller to wait for it or cancel it.

func (Run) Describe

func (o Run) Describe() string

Describe names the run, what started it and since when, in the words a refusal and a skipped fire's reason both use.

Jump to

Keyboard shortcuts

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