fix: When both InputStream and ErrorStream exist, copyStream cannot guarantee sequential execution by li-phone · Pull Request #735 · PowerJob/PowerJob

When both the input stream and the error stream exist in the script processor, the "copyStream" cannot guarantee sequential execution of these streams.

What is the purpose of the change

To guarantee that the output of the task in the script processor is ordered.

Brief changelog

To move the log submits to when the task completed.

Verifying this change

For example, a python script as the following:

print("hello, world")
print(hello, world)

Both the input stream and the error stream exist in this python script, we found that the execution result outputs of this python script were unordered when we view its logs. Therefore, we remove the omsLogger submits in the "copyStream" and move it to when the task completed.