liveBook · Manning

Running state

As explained in Build and Orchestrator in Go (From Scratch)

The running state is the task lifecycle condition in which a task has successfully started execution.

The running state means a task has successfully started execution. In the container-oriented lifecycle, a worker reaches this state after starting the task’s container. It follows Scheduled and precedes either normal completion or failure. section 2.1 section 4.6.3

Treat Running as an operational state with explicit transition rules:

Representing Running in Go

A Go State enumeration places Running between Scheduled and Completed or Failed. A transition map then records Running as allowing Running, Completed, or Failed, while helper logic checks whether a requested transition is valid. section 4.6.3

Figure 2.2 The states a task will go through during its life cycle
02-02

Use the lifecycle diagram to follow Running’s position between scheduling, execution, completion, and failure. section 2.1

How Build and Orchestrator in Go (From Scratch) covers it

How deep it goes
Defines the state and validates its allowed transitions, including execution, completion, and failure outcomes.
Examples
Uses a Go State enumeration, a transition map, a validation helper, and a Docker container startup sequence.
What you can do after
Diagnose/debug with it by checking whether a task’s observed transition matches the allowed lifecycle.
How it connects
Connects task lifecycle, workers, task scheduling, Docker containers, and state transitions.

This explainer was generated by Manning's knowledge graph from the text of Build and Orchestrator in Go (From Scratch). The section links point to the parts of the book it draws on.