You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to drop an instance of ChangesFollower directly into a Supervision tree, so it can act as a normally managed Worker, but it returns a different set of tuples than expected, so this fails.
As ChangesFollower registers as a behaviour, it must comply with the GenServer spec:
@callbackinit(args::term)::{:ok,db::ICouch.DB.t,state}|{:ok,db::ICouch.DB.t,opts::[option],state}|{:ok,db::ICouch.DB.t,opts::[option],state,timeout|:hibernate}|:ignore|{:stop,reason::any}whenstate: term
There's presumably a reason for doing it this way, but the result is that an additional GenServer-compliant behaviour needs to be wrapped around this before it can be used correctly in a standard OTP supervision tree.
Would you take a breaking change PR for ChangesFollower that deals with the extraneous items db, opts simply by removing them entirely from the returned tuple? It seems that any process spawning a ChangesFollower will already have the DB and options it passes into the worker.
I'm still working on a wrapper but how do you handle this at meetnow? It seems better to achieve this directly in ICouch.
The text was updated successfully, but these errors were encountered:
It should be possible to drop an instance of ChangesFollower directly into a Supervision tree, so it can act as a normally managed Worker, but it returns a different set of tuples than expected, so this fails.
As ChangesFollower registers as a behaviour, it must comply with the GenServer spec:
However its return spec is different, returning:
There's presumably a reason for doing it this way, but the result is that an additional GenServer-compliant behaviour needs to be wrapped around this before it can be used correctly in a standard OTP supervision tree.
Would you take a breaking change PR for ChangesFollower that deals with the extraneous items
db
,opts
simply by removing them entirely from the returned tuple? It seems that any process spawning a ChangesFollower will already have the DB and options it passes into the worker.I'm still working on a wrapper but how do you handle this at meetnow? It seems better to achieve this directly in ICouch.
The text was updated successfully, but these errors were encountered: