-
Notifications
You must be signed in to change notification settings - Fork 483
Prevent queue method to display output #268
Copy link
Copy link
Closed
Description
I have Rollbar exception tracking enabled for my project.
I want to notify Rollbar when I have deployed a new version. This can be done with the following code:
desc "Notifies rollbar."
task :notify_rollbar do
revision = `git log -n 1 --pretty=format:"%H"`
local_user = `whoami`
rollbar_token = '???' # TODO: Store rollbar token at one single place!
rails_env = 'production'
queue "curl https://api.rollbar.com/api/1/deploy/ -F access_token=#{rollbar_token} -F environment=#{rails_env} -F revision=#{revision} -F local_username=#{local_user} >/dev/null 2>&1"
endI then do a invoke :'notify_rollbar' before the to :launch do ... end block.
This works well, but the output from the CURL command is displayed during deployment:
-----> DB migrations unchanged; skipping DB migration
-----> Skipping asset precompilation
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
109 549 0 16 106 533 21 711 --:--:-- --:--:-- --:--:-- 2123 0
{
"data": {}
}-----> Build finished
-----> Moving build to releases/35
-----> Updating the current symlink
This is nasty. Is there a way to prevent this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels