terascope / teraslice

Scalable data processing pipelines in JavaScript
https://terascope.github.io/teraslice/
Apache License 2.0
50 stars 13 forks source link

Unexpected error when starting a job that completes before the `running` status check #3523

Closed ciorg closed 7 months ago

ciorg commented 10 months ago

When starting a job with the CLI if a job completes before the code verifies that it is running it throws the error:

Job cannot reach the target status, "running", because it is in the terminal state, "completed"

This only happens on very short jobs, but it can be confusing. I think the issue is somewhere in here: https://github.com/terascope/teraslice/blob/9a44c8eae4d1d41ceb96aab80478c197b9e0d09f/packages/teraslice-cli/src/helpers/jobs.ts#L435