Skip to content

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
}
FieldDefaultDescription
ApplicationVersionBinary hashTags workflows with a version. Useful for tracking which version created a workflow.
ExecutorID"local"Identifies this instance. Use unique values in multi-instance deployments.
GCRetention72hHow long to keep completed workflows. Negative = disabled.
GCSchedule"0 0 * * *"Cron expression for GC runs.
ProductSendernilSender 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:

CollectionPurpose
pt_workflow_statusWorkflow metadata, status, queue assignment
pt_operation_outputsStep results for replay on recovery
pt_notificationsInter-workflow messages (Send/Receive)
pt_workflow_eventsKey-value events (current state)
pt_workflow_events_historyEvent history for step-level replay
pt_productsProduct files generated by workflows
pt_kvGlobal key-value store
pt_schedulesSchedule management (enable/disable)
pt_webhooksWebhook subscriptions