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
I've been using Thespian for quite a while now and this is the first time I've had to run down an issue like this.
I have a ActorTypeDispatcher actor with the following methods:
defreceiveMsg_Alert(self, alert, _sender):
logger.warning(f"Alert message received from {_sender} to save: {alert}")
self.queue.append(alert)
self.wakeup()
# TODO: WHY DOES ADDING THIS MAKE receiveMsg_Alert work above?defreceiveMsg_dict(self, alert, _sender):
pass
Where the Alert message type is simply:
classAlert(dict):
pass
For some reason, messages of the Alert type just would not be handled by the first method until I added the _dict handler. Just by chance I added that method to see if the message type wasn't working, but once I did, it started working.
I have several, almost identical actors that have worked for almost 8 years without issue, but this is the first time I've run into this. Ideas?
The text was updated successfully, but these errors were encountered:
Is it possible that you had an ActorSystem loaded with an older version of whichever Actor was generating the message (as a dict and not an Alert)? Or are your self.wakeup or self.queue affecting things such that the logging message is not delivered?
The odd thing is that receiveMsg_dict is never called. Just the act of having it defined makes receiveMsg_Alert receive messages. If receiveMsg_dict is commented out or removed, receiveMsg_Alert no longer receives messages.
I've been using Thespian for quite a while now and this is the first time I've had to run down an issue like this.
I have a ActorTypeDispatcher actor with the following methods:
Where the
Alert
message type is simply:For some reason, messages of the
Alert
type just would not be handled by the first method until I added the_dict
handler. Just by chance I added that method to see if the message type wasn't working, but once I did, it started working.I have several, almost identical actors that have worked for almost 8 years without issue, but this is the first time I've run into this. Ideas?
The text was updated successfully, but these errors were encountered: