Commit 7aacc78b authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add Pipeline.summary()

parent a39acbc0
Loading
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -78,6 +78,9 @@ class Pipeline:
        clean_output_before_run: bool = True,
        **kwargs: Any,
    ):
        # record start time
        self.t_start = Time.now()

        # get pipeline information from env vars
        self.pipeline_id: str = os.getenv("PIPELINE_ID", "-")
        self.build: str = os.getenv("BUILD", "-")
@@ -147,9 +150,11 @@ class Pipeline:
        h.set("CREATED", self.pipeline_id, comment="pipeline build time")
        return reformat_header(h, strip=False, comment="Pipeline summary")

    def summarize(self):
    def summary(self):
        """Summarize this run."""
        pass
        t_stop: Time = Time.now()
        t_cost: float = (t_stop - self.t_start).value * 86400.0
        self.pipeline_logger.info(f"Total cost: {t_cost} sec")

    def clean_output(self):
        """Clean output directory."""