alfalfa icon indicating copy to clipboard operation
alfalfa copied to clipboard

Update subprocess calls to execute through check_call

Open nllong opened this issue 3 years ago • 4 comments

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.

nllong avatar Jan 19 '22 20:01 nllong

@TShapinsky was this resolved in job refactor?

anyaelena avatar Jun 30 '22 21:06 anyaelena

@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

TShapinsky avatar Jun 30 '22 21:06 TShapinsky

So we should update this issue to "Update subprocess calls to execute through check_call"?

anyaelena avatar Sep 30 '22 18:09 anyaelena

Yeah, that would be fine. We could possibly add job writing best practices to the wiki at some point

TShapinsky avatar Sep 30 '22 19:09 TShapinsky