amol- commented on a change in pull request #10650:
URL: https://github.com/apache/arrow/pull/10650#discussion_r672359949



##########
File path: dev/archery/archery/crossbow/cli.py
##########
@@ -233,6 +234,31 @@ def latest_prefix(obj, prefix, fetch):
     click.echo(latest.branch)
 
 
+@crossbow.command()
+@click.argument('job-name', required=True)
+@click.option('--fetch/--no-fetch', default=True,
+              help='Fetch references (branches and tags) from the remote')
+@click.pass_obj
+def save_report_data(obj, job_name, fetch):
+    """
+    Just print there the state of the job
+    """
+    output = obj['output']
+
+    queue = obj['queue']
+    print(dir(queue))
+
+    if fetch:
+        queue.fetch()
+
+    job = queue.get(job_name)
+    report = JsonReport(job=job)
+    
+    with tempfile.NamedTemporaryFile(delete=False) as temp:
+        temp.write(report.show(output))
+        temp.flush()

Review comment:
       You don't need to flush here, closing the file will already flush it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to