Skip to content

Commit

Permalink
Attempt to restart dead teams.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jun 13, 2018
1 parent b6d263c commit 7f1438a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions slack-market/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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}"
SlackMarket::Service.instance.start!(team)
end
end
rescue StandardError => e
logger.warn "Error pinging team #{team}, #{e.message}."
end
Expand Down

0 comments on commit 7f1438a

Please sign in to comment.