4

The .NET documentation for Batch includes a method for retrieving files off a node in the pool: link The corresponding classes in the python SDK don't have any methods. What is the best way of returning the stderr.txt file for a task when it fails?

RedPanda
  • 522
  • 6
  • 15

1 Answers1

3

I think you can do that by using the python batch_client, I found a implementation here: https://github.com/Azure/azure-sdk-for-python/blob/master/doc/batch.rst

# Download task output
with open('task_output.txt', 'w') as file_output:
        output = batch_client.file.get_from_task(
                'python_test_job',
                'python_task_1',
                'stdout.txt'
        )
        for data in output:
                file_output.write(data)
Tats_innit
  • 33,991
  • 10
  • 71
  • 77