php-slack-bot icon indicating copy to clipboard operation
php-slack-bot copied to clipboard

Process ends when "team_migration_started" message is received.

Open nimisis opened this issue 7 years ago • 4 comments

The process ends when message $data->type is "team_migration_started". See https://api.slack.com/events/team_migration_started. Any way to keep the process alive in this event?

nimisis avatar Sep 03 '16 18:09 nimisis

Hello,

Thank you for reporting this issue.

I think we should listen for the "team_migration_started" event and if it occurs, call the Bot::run() method again so the bot will reconnect. We should also handle "migration_in_progress" errors when reconnecting. Do you know a way to trigger this kind of event for testing purposes ?

jclg avatar Sep 03 '16 20:09 jclg

That would be great! Unfortunately I don't know how to trigger the event. All I can say is that I tested this in a team consisting of just me alone and started the test bot in the evening and it happened overnight. It's possible that server migrations happen more frequently for smaller teams...

nimisis avatar Sep 03 '16 20:09 nimisis

hi,

i know this is not the solution, but i use this for a php script, that needs to run endless in case of an exit-code, that is "okay" for me.... maybe this helps until a final solution has been found:

https://gist.github.com/michabbb/37a0e1f05a82233f3c97b65542083e05

michabbb avatar Oct 15 '16 22:10 michabbb

Hello Michael,

Thank you for this script. This is very much appreciated and I am sure this will be useful for people who encounter this problem.

jclg avatar Oct 16 '16 19:10 jclg