Skip to main content

Usage

from upsonic.durable import RedisDurableStorage

# Create Redis storage
storage = RedisDurableStorage(
    host="localhost",
    port=6379,
    db=0,
    password="your_password",  # Optional
    prefix="upsonic:durable:"  # Key prefix
)

durable = DurableExecution(storage=storage)
task = Task("Distributed task", durable_execution=durable)

Params

ParameterTypeDescriptionDefault
hoststrRedis server host”localhost”
portintRedis server port6379
dbintRedis database number0
passwordOptional[str]Redis passwordNone
prefixstrKey prefix”durable_exec:“

Characteristics

  • ⚡ Very fast in-memory performance
  • ✅ Distributed architecture support
  • ✅ Built-in TTL for automatic cleanup
  • ✅ Scalable to millions of executions

Docker Setup

# Start Redis with Docker
docker run -d --name upsonic-redis -p 6379:6379 redis:latest