#GenServer catching Oban.Pro.Relay notification messages sometimes

2 messages · Page 1 of 1 (latest)

dim orchid
#

Hello! I'm using Oban.Pro.Relay in prod inside a GenServer (a Phoenix channel process to be precise). I checked and all Relay.asyncis followed by a Relay.await in my code, but there are still instances in prod where the GenServer receives the message instead of the Relay.await loop intercepting it. What could be the cause? How would one deal with that - or more generally, how does one handle unexpected messages in your handle_info?

dim orchid
#

Ok, I believe I found the cause: if Oban.Pro.Relay.await times out but the job still finishes, the message will be sent to the process and won't be caught by the await loop, causing it to leak to the calling process - kind of annoying having to deal with that 🥲