diff --git a/README.md b/README.md index c8ee629..3d55c5f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ durable = "0.1" ## Quick Start ```rust -use durable::{Durable, Task, TaskContext, TaskResult, WorkerOptions, async_trait}; +use durable::{Durable, MIGRATOR, Task, TaskContext, TaskResult, WorkerOptions, async_trait}; use serde::{Deserialize, Serialize}; // Define your task parameters and output @@ -101,6 +101,12 @@ async fn main() -> anyhow::Result<()> { .build() .await?; + // Run migrations (idempotent - safe to call on every startup) + MIGRATOR.run(client.pool()).await?; + + // Create the queue (idempotent - safe to call on every startup) + client.create_queue(None).await?; + // Register your task client.register::().await;