pakoito
03/10/2020, 1:17 PMrelease = { clientSession, case ->
val exit =
when (case) {
ExitCase.Completed -> IO { clientSession.commitTransaction().awaitFirstOrNull() }.handleErrorWith { IO { logError() } }
else -> IO { clientSession.abortTransaction().awaitFirstOrNull() }
}
exit.effectMap { clientSession.close() }
}