Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pup/lib/core/status.ts>Status

Universal process manager built in Deno
Go to Latest
class Status
import { Status } from "https://deno.land/x/pup@1.0.0-beta.36/lib/core/status.ts";

Represents the status of the application and provides methods to write the status to disk or store.

Constructors

new
Status(storeName?: string)

Constructs a new Status instance.

Properties

private
lastWrite
private
optional
storeName: string

Methods

Generates the current application state based on the statuses of the processes.

Should make any changes necessary when the application exits, like unsetting last_application_state in the kv store.

purge(keepHours: number): Promise<number>
writeToStore(applicationState: ApplicationState)

Writes the application status to the KV store with a timestamp as the key.

Key ["last_application_state"] is written every iteration. Key ["application_state", <timestamp] is written at most once per 20 seconds.