MikeDacre / fyrd

Submit functions and shell scripts to torque and slurm clusters or local machines using python.
https://fyrd.science
MIT License
22 stars 8 forks source link

Makes output handling more robust and alters testing. #36

Closed MikeDacre closed 8 years ago

MikeDacre commented 8 years ago

This represents a significant API break for the handling of outputs.

Previously, Job.get() would return (exitcode, stdout, stderr), not it just returns the output, which is either the function return value, or the contents of STDOUT. All other variables (.out, .stdout, .stderr, and exitcode) are saved and the temp files cleaned up by default after get() completes.

I think this makes more intuitive sense than the prior approach, it should also be more stable.

The one potential downside is that very large return values get loaded into memory by default. That can be avoided by using wait().