docs: def get_job_logs_from_workflow(workflow_id):
      """Retrieve the crawl logs from the workflow id."""
      query_result = (
          db.session.query(
              models.CrawlerJob.logs,
          )
          .join(
              models.CrawlerWorkflowObject,
              models.CrawlerJob.job_id == models.CrawlerWorkflowObject.job_id,
          )
          .filter(models.CrawlerWorkflowObject.object_id == workflow_id)
          .one_or_none()
      )
  
      if query_result is None:
          click.secho(
              (
                  "Workflow %s was not found, maybe it's not a crawl workflow?" %
                  workflow_id
              ),
              fg='yellow',
          )
          sys.exit(1)
  
      _show_file(
          file_path=query_result[0],
          header_name='Log',
      )