Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts. Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation. Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
41 lines
1.4 KiB
Go
41 lines
1.4 KiB
Go
// Package dregarnuhr owns in-process scheduling, worker admission and retry
|
|
// policy. Queue provides persistence; Registry provides business operations.
|
|
// Atomic claims are not cross-instance expiring leases.
|
|
package dregarnuhr
|
|
|
|
import "errors"
|
|
|
|
const Component = "dregarnuhr"
|
|
|
|
var (
|
|
ErrNoJob = errors.New("no due job")
|
|
ErrSkipped = errors.New("event is not applicable")
|
|
)
|
|
|
|
type Job struct {
|
|
UUID string `json:"uuid"`
|
|
EventUUID string `json:"event_uuid,omitempty"`
|
|
Type string `json:"event_type"`
|
|
Key string `json:"event_key"`
|
|
Payload string `json:"payload,omitempty"`
|
|
Status string `json:"status"`
|
|
Priority int `json:"priority"`
|
|
Attempts int `json:"attempts"`
|
|
MaxAttempts int `json:"max_attempts"`
|
|
RunAtMS int64 `json:"run_at_ms"`
|
|
StartedAtMS int64 `json:"started_at_ms,omitempty"`
|
|
FinishedAtMS int64 `json:"finished_at_ms,omitempty"`
|
|
CancelRequested bool `json:"cancel_requested"`
|
|
Error string `json:"error,omitempty"`
|
|
CreatedAt int64 `json:"created_at_ms"`
|
|
UpdatedAt int64 `json:"updated_at_ms"`
|
|
}
|
|
|
|
type Settings struct {
|
|
Paused bool `json:"paused"`
|
|
Concurrency int `json:"concurrency"`
|
|
MaxDepth int `json:"max_depth"`
|
|
RetryBaseSeconds int `json:"retry_base_seconds"`
|
|
RetentionHours int `json:"retention_hours"`
|
|
}
|