diff --git a/docs/source/includes/_guide.md b/docs/source/includes/_guide.md index 260adcf9..19c8531d 100644 --- a/docs/source/includes/_guide.md +++ b/docs/source/includes/_guide.md @@ -617,12 +617,26 @@ if err != nil { ### Automatically expiring finished workflow instances +This differs for different backend implementations. + +#### SQLite & MySQL + +```go +client.StartAutoExpiration(ctx context.Context, delay time.Duration) +``` + +When you call this on a client, a workflow will be started in the `system` queue that will periodically run and remove finished workflow instances that are older than the specified delay. + +
+ +#### Redis + ```go b, err := redis.NewRedisBackend(redisClient, redis.WithAutoExpiration(time.Hour * 48)) // ... ``` -For now this is only supported for the Redis backend. When an `AutoExpiration` is passed to the backend, finished workflow instances will be automatically removed after the specified duration. This works by setting a TTL on the Redis keys for finished workflow instances. If `AutoExpiration` is set to `0` (the default), no TTL will be set. +When an `AutoExpiration` is passed to the backend, finished workflow instances will be automatically removed after the specified duration. This works by setting a TTL on the Redis keys for finished workflow instances. If `AutoExpiration` is set to `0` (the default), no TTL will be set. ## Logging