code: def pg_wait(self):
          
          retries = 10
          while retries:
              retries = retries - 1
              try:
                  self._run(["heroku", "pg:wait", "--app", self.name])
              except subprocess.CalledProcessError:
                  time.sleep(5)
                  if not retries:
                      raise
              else:
                  break
docs: Wait for the DB to be fired up.