From a32c2b2087d09705d64b66a6bf316def722de501 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 15 Nov 2023 13:47:16 -0700 Subject: [PATCH] print_trace --- qiita_db/processing_job.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/qiita_db/processing_job.py b/qiita_db/processing_job.py index 07388442e..779dacfc5 100644 --- a/qiita_db/processing_job.py +++ b/qiita_db/processing_job.py @@ -2003,6 +2003,20 @@ def complete_processing_job(self): return ProcessingJob(result[0]) return None + @property + def print_trace(self): + """ Prints the full trace of the job, from it self to validators + and complete jobs""" + print(f'{self.id} [{self.external_id}] - {self.command.name}') + cjob = self.complete_processing_job + print(f' {cjob.id} [cjob.external_id]') + vjob = self.release_validator_job + print(f' {vjob.id} [vjob.external_id]') + for v in self.validator_jobs: + print(f' {v.id} [{v.external_id}] - {v.command.name}') + cjob = v.complete_processing_job + print(f' {cjob.id} [cjob.external_id]') + class ProcessingWorkflow(qdb.base.QiitaObject): """Models a workflow defined by the user