heroku-apps icon indicating copy to clipboard operation
heroku-apps copied to clipboard

add ps:wait command and supporting function

Open jdowning opened this issue 6 years ago • 2 comments

This adds a function ps_wait that is mostly pulled from uhoh-itsmaciek/heroku-ps-wait. This allows a user to run heroku ps:wait to wait for all dynos to be up and running. Additionally, this adds a flag to ps:restart (--wait) to run the ps_wait function after initializing the restart.

ᐅ h ps:wait                
Waiting for every dyno to be running v977... 37 / 37, done

ᐅ h ps:restart web && h ps:wait --type web 
Restarting web dynos on ⬢ my-heroku-app... done
Waiting for every web dyno to be running v977... 2 / 2, done

ᐅ h ps:restart --wait
Restarting dynos on ⬢ my-heroku-app... done
Waiting for every dyno to be running v977... 37 / 37, done

jdowning avatar Oct 25 '17 20:10 jdowning

looks great! but we should really have a test for at least the happy path of ps:wait. I can give you a hand writing that if you like.

jdx avatar Oct 25 '17 21:10 jdx

Codecov Report

Merging #208 into master will decrease coverage by 2.05%. The diff coverage is 20.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #208      +/-   ##
==========================================
- Coverage   95.72%   93.67%   -2.06%     
==========================================
  Files          76       78       +2     
  Lines        1521     1564      +43     
  Branches      289      301      +12     
==========================================
+ Hits         1456     1465       +9     
- Misses         62       85      +23     
- Partials        3       14      +11
Impacted Files Coverage Δ
src/ps_wait.js 6.06% <6.06%> (ø)
src/commands/ps/restart.js 93.75% <66.66%> (-6.25%) :arrow_down:
src/commands/ps/wait.js 71.42% <71.42%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ae5df4f...513c873. Read the comment docs.

codecov[bot] avatar Oct 25 '17 21:10 codecov[bot]