Hey,
Sorry for the vague title, was not sure how to frame this.
Context: in a project, I’m creating a service that connects to Redis, reads data from various keys and constructs an object from these. The user can then query that service in their patch and access that data. In the service class, I have Log nodes both on Create and Dispose to check when the service gets created/disposed.
I have noticed two odd behaviors :
- Sometimes, when I patch inside the service class (create nodes, add pins, etc), I see in the Logs the service being created again without having been disposed first, which leads to
BindToRedisnodes in the service show a warning that “This key is already bound to another channel”. The only solution then is to F9, then everything goes back to normal. - I have also seen the log spamming those
OUTDATEDmessages soon as you create a pin without assigning a type in the service class.
All of these do not seem to happen when the user just uses the service and does not touch the underlying class. Does that mean that you should basically expect things to go wrong when you’re patching a service while it’s running?
I have tried to reproduce in an isolated setup, but could only repro the second behavior:
- Open the attached patch
- Navigate to
MyServiceUsingRedis - Open the Log
- Create a pin without a type from the node browser (New > Input), you’ll see the
OUTDATEDmessages spamming the log
I’m not able to reproduce the “service being recreated without having been disposed” here, can share the patch in private if that helps.
Thanks!
ServiceNotDisposed.vl (30.0 KB)