kestra-io / plugin-gcp

Apache License 2.0
9 stars 10 forks source link

fix: wait for logs in task runners #385

Closed loicmathieu closed 6 months ago

loicmathieu commented 6 months ago

Logs can be available in the log stream after the job ends as everything is anynchronous so we don't have any other option than to wait a little for them to arrives. This wait time is configurable and set to a conservative value of 5s.

Note that calling cancel() on the stream will make the stream iterator to return false to hasNext() effectively ending the stream, no need for a boolean for that.

Fixes https://github.com/kestra-io/kestra/issues/3695