pub async fn init(database_url: &str) -> Result<DurableInstance, DurableError>Expand description
Initialize durable: connect to Postgres, run migrations, start heartbeat, and recover stale tasks from prior crashes.
Returns a DurableInstance which derefs to DatabaseConnection for
backwards compatibility.
Uses HeartbeatConfig::default() (60 s heartbeat, 180 s staleness).
For custom intervals use init_with_config.
ⓘ
let durable = durable::init("postgres://localhost/mydb").await?;