Skip to content

Commit

Permalink
Attempt at restarting dead bots.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jun 13, 2018
1 parent b031902 commit f41add0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions slack-gamebot/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ def ping_teams!
ping = team.ping!
next if ping[:presence].online
logger.warn "DOWN: #{team}"
after 60 do
ping = team.ping!
unless ping[:presence].online
logger.info "RESTART: #{team}"
SlackGamebot::Service.instance.start!(team)
end
end
rescue StandardError => e
logger.warn "Error pinging team #{team}, #{e.message}."
end
Expand Down

0 comments on commit f41add0

Please sign in to comment.