Back end
Jobs & schedules
Accent
Scheme
Backdrop motion
Back end

Jobs & schedules

Work the back end does of its own: a job fn is written down when it is queued and done later, at least once, across restarts; server at runs a block at a time of day; migrate changes the data once for a database.
job fnCalling a job fn queues it and gives its id; it cannot fail. Only the back end queues one (a server fn that says who may). A run that fails is tried again after 1 s, 4 s, 16 s …, retries times, then kept as failed and told to server on jobFailed.
live brews: what the jobs madeNothing brewed yet.
jobs.listThe program's jobs, newest first, each {id, name, args, state, due, tries, words, kind, at}: asked every second here through a server fn. jobs.cancel stops one still waiting; jobs.retry sets one that failed to wait again, from its first try.
jobs.list() has nothing of pgBrewJob yet.
server atA block that runs each day when a clock reads that time: UTC unless zone= says whose; days may stand before it. With several back ends at one database one runs it; a moment the back end was down for is made up at the next start, if under an hour late. This playground has one, tidying brews each night: it is described, not waited for.
in mote test the clock is moved, and the block runs at its moment (pages/backend_tests.mote)
test "brews older than a day go at three in the night" clock "2026-03-01T09:00" pgBrewNow("coffee", false)? run jobs clock +1 day expect PgBrew.count({}) == 1 clock +18 hours expect PgBrew.count({}) == 0
migrateA block of the back end's statements, run once for a database as it starts, after the schema's own steps, all or none. Its name is what is remembered. This playground's puts the tally the Models page adds to.
what the database remembers (mote_migrated, a table of the runtime's, in app.sqlite)
pg-tally-likes done once, the first time this back end's data folder was opened
esc
Pages
StartStart
Buttons & badgesComponents
Cards & disclosureComponents
Dialogs & drawersComponents
Menus & commandsComponents
Dates & tablesComponents
ChartsComponents
Chart galleryComponents
FieldsComponents
ChoicesComponents
DisplayComponents
NavigationComponents
Popovers & sheetsComponents
MessagesChat & AI
Prompt inputChat & AI
Reasoning & toolsChat & AI
Developer partsChat & AI
ConversationChat & AI
Code artifactsChat & AI
VoiceChat & AI
Code blocksChat & AI
MarkdownChat & AI
EditorElements
TerminalElements
FlowElements
3D boxesElements
PaintElements
SurfaceElements
MediaElements
IconsElements
PrimitivesElements
SQLBatteries
StorageBatteries
Net & resourcesBatteries
Crypto & bytesBatteries
ZipBatteries
TablesBatteries
PDFBatteries
TimeBatteries
ImagesBatteries
ScanBatteries
Video & audioBatteries
SearchBatteries
SyntaxBatteries
PatternsBatteries
NotifyBatteries
ShareBatteries
State & logicLanguage
WorkersLanguage
Events & elementsLanguage
StylingLanguage
RoutesLanguage
ShortcutsLanguage
Long listsLanguage
Failures & tryLanguage
Back endBack end
Models & writesBack end
Rules & failuresBack end
Jobs & schedulesBack end
Running itBack end
ExtensionsBack end
AIBack end
AnalyticsBack end
AboutAbout
↑↓move
↵open
676 places · ranked by BM25