Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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-rc.14/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>

Deletes the application_state logs older than the given number of hours.

writeToStore(applicationState: ApplicationState)

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

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