Noah Clark
Noah Clark

Reputation: 8131

Have Heroku App Restart it self from Heroku

So, if I run the command heroku ps:restart event_machine.1 --app app-name I get what I want. However, I'm trying to automate our travis-ci deploy process. What needs to happen is the following:

  1. We have a successful test run.
  2. Next, we deploy the code
  3. If we deploy the code successfully, we need to execute a few rake tasks that tell an external service to rebuild it self.
  4. Once this is fired off, we need to restart the heroku app. In travis, ideally, this would be executed on the heroku machine via a deploy run command. This would be done in much the same way that we run bundle exec db:migrate.

Does anyone have any thoughts on how we we can restart a particular dyno(s) via a command that can be ran via heroku run something as that is what travis is executing in the deploy run.

Upvotes: 0

Views: 68

Answers (1)

Noah Clark
Noah Clark

Reputation: 8131

So, to answer this we had a procfile that is executing a rake command to spin up event machine. We've modified this at the proc file level to first tell the external service to rebuild it self, before starting the event machine. This takes travis completely out of the deployment loop, which is better because it allows Heroku and Travis to each do what they should be responsible for.

Upvotes: 1

Related Questions