def _append_completed_result()

in backend/time-series-forecasting/services/forecast_job_coordinator.py [0:0]


    def _append_completed_result(self, future: futures.Future):
        """Append the result to a cache. Used as a Future callback.

        Args:
            future (futures.Future): The future that will return the TrainingResult.
        """
        output: Tuple[
            str, completed_forecast_job.CompletedForecastJob
        ] = future.result()

        # Deconstruct
        job_id, result = output

        if result:
            # Clear pending job
            del self._pending_jobs[job_id]

            # Append completed training results
            self._completed_jobs[job_id] = result