river-demo

command module
v0.0.0-...-79d1445 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 1 Imported by: 0

README

river-demo

Small demo CLI for River using PostgreSQL.

It provides a rivercli command with three subcommands:

  • migrate – runs River schema migrations
  • spawn – enqueues a demo job (optionally failing)
  • work – starts workers to process queued jobs

Prerequisites

  • Go (matching go.mod)
  • PostgreSQL
  • DATABASE_URL set (or pass --database-url)

Example:

export DATABASE_URL='postgres://postgres:postgres@localhost:5432/river_dev?sslmode=disable'

Install

Install the CLI with go install:

go install github.com/mheers/river-demo@latest

This installs the binary as river-demo in your Go bin directory.

Quick start

# 1) Run migrations
river-demo migrate

# 2) Start worker (keep running in one terminal)
river-demo work

# 3) Enqueue a successful job
river-demo spawn

# 4) Enqueue a failing job with limited attempts
river-demo spawn --fail --max-attempts 3

Tip: check available flags with:

river-demo --help
river-demo spawn --help

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
db
job

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL