java.util.concurrent.RejectedExecutionException
. (I'm using ZIO) I guess it's because the failed scala Future messes up with thread pools due to the cats-effect bug in IO.fromFuture
which is fixed in 2.0.0-M4. typelevel/cats-effect#546
fromFuture
in aecor, which requires an implicit ContextShift[IO]
now. Although we can simply add the same constraint to aecor.util.effect.AecorListIOOps#fromFuture
to be prepared, I'd suggest following more polymorphic direction as being discussed in typelevel/cats-effect#563 .
@notxcain Hi! I spent three more months with aecor and now I got more understanding about it. It was a lot of fun :)
Today's question: How long does it take usually for you to deploy a new processs for DistributedProcessing? We're deploying a 5-node akka cluster on Fargate, and unfortunately it takes almost 20 minutes to finish the rolling update despite of its small size. It goes like this:
Could you give me some advice on redeploying an aecor cluster?
akka.cluster.sharding.ShardRegion
:FeeInquiryExpirationProcess: Trying to register to coordinator at [ActorSelection[Anchor(akka://diamond@10.40.20.22:2552/), Path(/system/sharding/FeeInquiryExpirationProcessCoordinator/singleton/coordinator)]], but no acknowledgement. Total [108] buffered messages. [Coordinator [Member(address = akka://diamond@10.40.20.22:2552, status = Up)] is reachable.]
def reserve(client: ClientId, records: NonEmptyList[LnsRecord], expiresAt: Instant): I[Unit] = {
for {
now <- currentTime
x <- OptionT(read).cata(
if (records.distinct =!= records) reject(DuplicateRecords)
else if (records.size > 4) reject(TooManyRecords)
else if (expiresAt.isBefore(now)) reject(InvalidExpirationDate)
else append(PointCodeReserved(client, records, expiresAt)),
_ => reject(PointCodeAlreadyExists),
)
} yield x
}
EventsourcedBooking.place
OptionT(read).cata
I
that cata
needs is some how messed up
cata
can't do what i want
cata
does