Hi all, suppose rather than IO[_] my effect type is Either[String, _], what would be the right way to integrate this with cats-retry? I can lift the latter into the IO context by folding the Left to an exception instance, but this seems clunky. Ideas?
might be your best bet
how would you retry an Either? It's a value that doesn't contain effects so I don't think you'll ever have a successful retry
Retries imply nondeterminism, and that implies effects (IO)
any help on Error:(54, 50) diverging implicit expansion for type cats.kernel.Order[A] starting with method catsKernelStdOrderForSortedSet in trait LowPrioritySortedSetInstancesBinCompat1 policy = RetryPolicies.exponentialBackoff(FiniteDuration.apply(5, TimeUnit.SECONDS)),
@sfines-clgx I would try adding a type parameter to give the compiler some help, e.g. policy = RetryPolicies.exponentialBackoff[IO](FiniteDuration.apply(5, TimeUnit.SECONDS)),
Hello everyone! Any plans for an update to scalajs 1.+? I'm trying to update cats-mtl to 1.0.0, but I'm blocked by the old version of scala js. Since cats-mtl 1.0.0 compiled with sjs 1.+ . I can try to manage this, but according to the PR section the repo looks stale
Turns out it wasn't complicated. Here is the PR cb372/cats-retry#229. But I still need to sort out an issue with mima.
@iRevive I think in this case there’s really no binary compatible way around
so we probably need to bump cats-retry to 2.0.0
Yeah, 2.x series sounds like a good option
Hi, is there anything to facilitate working with partial failures? e.g. I am working with DynamoDB where writing batches can result in a response that can be a success, but also contain a list of items that failed to persist for whatever reason including throttling etc.. and is therefore retryable. However the action input in this case would be different from the original.
@DamienOReilly I don’t think we have anything like this yet
but feel free to open an issue or a PR
sounds like a fun problem to work on
could look something like this:
defretryPartial[M[_], E, P](
isWorthRetrying: A => Option[P],
reconstruct: P => M[A]
)(action: M[A]): M[A]
Thanks Luka, sure I will see if I can get some free time over the next few weeks to pluck away at it.
I'm trying cats-retry with IOApp and I'm getting the following error
could not find implicitvalue for parameter sleep: retry.Sleep[cats.effect.IO]