Configuration
turbine.Config
go
type Config struct {
ApplicationVersion string // app version tag (default: binary hash)
ExecutorID string // instance identifier (default: "local")
GCRetention time.Duration // how long to keep completed workflows (default: 72h)
GCSchedule string // cron expression for GC runs (default: "0 0 * * *")
ProductSender ProductSender // optional sender for product files
}| Field | Default | Description |
|---|---|---|
ApplicationVersion | Binary hash | Tags workflows with a version. Useful for tracking which version created a workflow. |
ExecutorID | "local" | Identifies this instance. Use unique values in multi-instance deployments. |
GCRetention | 72h | How long to keep completed workflows. Negative = disabled. |
GCSchedule | "0 0 * * *" | Cron expression for GC runs. |
ProductSender | nil | Sender for product files. |
Example
go
rt := turbine.Setup(app, turbine.Config{
GCRetention: 24 * time.Hour, // keep completed workflows for 24h
GCSchedule: "0 */6 * * *", // run GC every 6 hours
})Set GCRetention to a negative value to disable automatic garbage collection.
Manual GC
go
err := rt.GarbageCollect()Pending and enqueued workflows are never deleted by GC.
SQLite Collections
Turbine creates these collections automatically on first launch:
| Collection | Purpose |
|---|---|
pt_workflow_status | Workflow metadata, status, queue assignment |
pt_operation_outputs | Step results for replay on recovery |
pt_notifications | Inter-workflow messages (Send/Receive) |
pt_workflow_events | Key-value events (current state) |
pt_workflow_events_history | Event history for step-level replay |
pt_products | Product files generated by workflows |
pt_kv | Global key-value store |
pt_schedules | Schedule management (enable/disable) |
pt_webhooks | Webhook subscriptions |