alfalfa
alfalfa copied to clipboard
Update subprocess calls to execute through check_call
There are many call
methods in the worker since the CLI is used to do many of the operations. The CLI is either OpenStudio or Python right now. Create a new wrapper method around call
to handle these subprocesses in order to log, test, etc, etc.
@TShapinsky was this resolved in job refactor?
@anyaelena there is no wrapper, but it is now recommended that subprocess calls be done with check_call
instead of call
for proper error handling. See https://github.com/NREL/alfalfa/blob/develop/tests/worker/jobs/subprocess_mock_job.py
So we should update this issue to "Update subprocess calls to execute through check_call"?
Yeah, that would be fine. We could possibly add job writing best practices to the wiki at some point