Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[220] Upload and download operations are now a subprocess #230

Merged
merged 7 commits into from
May 19, 2023
Merged

Conversation

giventocode
Copy link
Contributor

@giventocode giventocode commented May 19, 2023

Closes: #220

This PR includes:

  • The download and upload operations are launched as subprocesses when the runner executes a full task.
  • The runner returns 1 as the exit code when an operation fails, 0 if it succeeds.
  • Refactoring and improved logging and console output.

@giventocode giventocode requested a review from MattMcL4475 May 19, 2023 14:29
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
process.WaitForExit();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use await process.WaitForExitAsync(); and avoid a blocking thread?

private ProcessExecutionResult ToProcessExecutionResult(Process process)
{
return new ProcessExecutionResult(
process.StandardOutput.ReadToEnd(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.ReadToEndAsync()

@giventocode giventocode merged commit 22ffc58 into main May 19, 2023
@giventocode giventocode deleted the ja-220 branch May 19, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[#148 Implement TES Task Runner] Execute download and upload operations on their own process
2 participants