atmos / heaven

:walking: Rails app for GitHub Flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy start message at the same time as the end message

pedrofranceschi opened this issue · comments

Hi,

Whenever I deploy something with Heaven, I get the deploy start/end messages at the same time (when the deploy ends) in my chat service (Slack), even though the deployment takes 10 minutes. Why is that?

screen shot 2014-11-22 at 6 09 21 pm

I'm using a custom provider for our stack, which is available here: https://github.com/pagarme/heaven/blob/master/lib/heaven/provider/deplorator.rb

Thanks!

If you're running on Heroku, you will need at least a couple of dyno instances for the workers.

We are running on EC2 with two workers, one just for the deployment_status queue. What is the correct way to use it? We'll have a lot of concurrent deployments, should we just scale to 10 workers?

On Heroku, I have 1 dyno for web, and 2 dynos for the workers.

Not sure what the equivalent for EC2 would be.

Actually it makes no difference where I'm running it, I'll try to add more workers.

I'm using 10 workers and it's working now. There's still a delay(like 5-10s) before sending the message but it's sent before the deploy begin.

@pedrofranceschi Does your cli automatically background when invoked? Capistrano blocks so you'll get a delay between invoking and completing.

No, actually it works like capistrano, just uses HTTP instead of SSH.

@greenboxal ahh ok, so the http request returns almost instantly but the underlying server that does the execution once you make the http request won't complete until the tasks finish?

I think you might want to have the service that lives behind your http API send the "success" state when it completes instead of doing it through the custom provider you have.

oh no, it streams back all the deploy stdout & stderr, the process only ends when the deploy is finished and provides the correct exit code.