Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Update README.md (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinkledink committed Feb 22, 2023
1 parent 8bedfd5 commit 29ba67c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {
}

dependencies {
implementation("io.github.nomisrev:saga:0.1.3")
implementation("io.github.nomisrev:Saga:1.0.1")
}
```

Expand Down Expand Up @@ -49,8 +49,8 @@ suspend fun Payment.awaitSuccess(): Unit = throw RuntimeException("Payment Faile

suspend fun main() {
saga {
val order = saga { createOrder() }.compensate(::deleteOrder).bind()
val payment = saga { createPayment(order) }.compensate(::deletePayment).bind()
val order = saga(action = { createOrder() }, compensation = { ::deleteOrder })
val payment = saga(action = { createPayment(order) }, compensation = { ::deletePayment) })
payment.awaitSuccess()
}.transact()
}
Expand Down

0 comments on commit 29ba67c

Please sign in to comment.