php-slack-bot
php-slack-bot copied to clipboard
Process ends when "team_migration_started" message is received.
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?
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 ?
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...
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
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.