Batch Job State is misleading
- Dominant language
- TypeScript
- Stars
- 205
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I've got an R script that checks every few seconds if my Job is "completed" using the following line:
`doAzureParallel::getJob( jobId, verbose = FALSE)$jobState`
And only if I get a "completed" JobState then I pull the job's results locally. So few days ago, I noticed that once the Job-state is retrieved as "completed" and job's results are pulled locally, the number of completed tasks pulled are less than the number of tasks initially sent to the Batch. If I try to pull the job again 1-2 minutes later then all the completed tasks are returned properly.
So I have noticed that the last few days there is a lag between the "completed" job state and the actual completion of the job. I was wondering if that is a bug in your side.
**Expected behavior**
1. The expected behavior (as it was until few days ago) is that once the job tasks are truly completed then the Job state becomes "completed". Not sooner.
2. Batch Explorer should be more accurate and quick with the visualization of the Tasks' progress.
**Version:**
- OS: [Windows Server 2016 Datacenter]
- Version [1607]
**Screenshots**

Same Job, re-run:
Top right shows only zeros.

Same Job, re-run:
Again, It appears as "completed" while it is actually not!

**Additional comment**
What I have also noticed the last few days, is that most of the times tasks "Queued" and when completed they jump to the "Succeeded", without going through the "Running". I.e. "Running tasks" remain 0 all the time until job finishes. See e.g. the first image.
Contributor guide
Assessment
This issue has not been assessed yet.