def experiment_completed(self):
        """Checks the current state of the experiment to see whether it has
        completed. This makes use of the experiment server `/summary` route,
        which in turn uses :meth:`~Experiment.is_complete`.
        """
        heroku_app = HerokuApp(self.app_id)
        status_url = "{}/summary".format(heroku_app.url)
        data = {}
        try:
            resp = requests.get(status_url)
            data = resp.json()
        except (ValueError, requests.exceptions.RequestException):
            logger.exception("Error fetching experiment status.")
        logger.debug("Current application state: {}".format(data))
        return data.get("completed", False)
def experiment_completed ( self ) : heroku_app = HerokuApp ( self . app_id ) status_url = "{}/summary" . format ( heroku_app . url ) data = { } try : resp = requests . get ( status_url ) data = resp . json ( ) except ( ValueError , requests . exceptions . RequestException ) : logger . exception ( "Error fetching experiment status." ) logger . debug ( "Current application state: {}" . format ( data ) ) return data . get ( "completed" , False )
Checks the current state of the experiment to see whether it has
        completed. This makes use of the experiment server `/summary` route,
        which in turn uses :meth:`~Experiment.is_complete`.