-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actor termination #9
Comments
Linked Channel actors will be terminate on Bot#terminate: ea3dd5c. Still, no mechanism to regularly clean up wild, "orphaned" Channel actors. |
Hey Tobias. What's the case in which "orphaned" channel actors spring into existence? In other words, how do I know if there are any orphaned Channel actors? After calling |
"Orphaned" Channels spring into existence when for example leaving one or being kicked off one. The channels should be terminated when the Bot is terminated, but there's no mechanism that will terminate such inactive channels regularly. One way would be to remember all channels on join/etc and check regularly if these channels are present in |
I don't think I've hit the use case you described. When I noticed that the bot is still showing as present on a channel even though I killed the bot = Vetinari::Bot.new do |c|
# config
end
# later
bot.terminate As far as I understand, after I kill the What I don't understand is, why does the bot show as present, even though all the channel actors are (or at least, should be) dead. Where is this channel presence being maintained? |
IIRC: Channels are linked to the Bot so if the Bot crashes, the channels shall crash and die as well. But just because Channels are linked to the Bot doesn't mean the Channels are terminated when the Bot is terminated. When terminating the Bot, the following calls happen:
If the Bot parts a Channel, this Channel is simply removed from |
Linked Channel actors won't be terminated at any time. Memory leaks incoming.
The text was updated successfully, but these errors were encountered: