Closed samuri51 closed 11 years ago
or is there some event i can listen for if my connection gets terminated? an error message or a timeout with bot.connect() ? i guess the above method wouldn't work though because if your not connected to the internet you can't recieve a callback right?
@dubbyTT said he had something working. I'd like to see what he figured out.
Half of me really wants to share my solution and help the community, while the other half wants to overtake TT.fm with B^Dub's Bots... $_$ lol. Pipe dream I guess... lemme spend some time making a proper fork of the TTAPI with my changes... and then I'll make an auto reconnecting bot example, since that is pretty important.
As far as crash recovery, there are a number of process monitors out there... but they are mostly bloated and crash themselves after a while (like "Forever", omg why are are there SO MANY FILES in the Forever installation!!!!??). Seriously , I just ended up coding my own and it works. I'm still beta testing it though, so no example for that yet.
That'd be great. I am using Forever and while it works... I know there has to be something better.
@DubbyTT thx man :), lookin forward to it
^remember to close once the problem is solved.
Yes thank you we got this @Turntablelover ... now get back to Codecademy.com and finish your voting command :smiley_cat:
@MikeWills @samuri51 This should solve your issues with auto reconnecting https://github.com/alaingilbert/Turntable-API/pull/223
Enjoy ;-)
i'm wondering what a good way to reconnect after losing connection would be. I noticed that a lot of times my app will still be running on its server but the bot is not actually in the room... i've tried something like monitoring the time between speak events and then if nothing is recieved it tries to speak and if that fails it tries to reconnect. which works when i'm actually connected to turntable, but when i unhook the internet cable it seems to just stop trying to use the ttapi all together.
heres what i've tried...
I've also noticed that it doesn't throw an error is bot.connect doesn't work...