anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: sap/infrabox
Issue: Cannot restart one of two parallel jobs if they have the same followers

**Describe the bug**
Assume we have 3 jobs: A, B, and C.
Job C is dependent on A and B, while A and B can run in parallel and are independent from each other.
If both jobs A and B failed, it is impossible to retrigger them at the same time. First, one of the jobs has to be restarted and finish and only afterwards the second job can be retriggered.

If you try to retrigger them together, the error message appears: 
"Some children jobs are still running"

**To Reproduce**
Steps to reproduce the behavior:
1. Create 3 jobs, like
A ___
B __ &nbsp;&nbsp;|
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;|___
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;|_____ C
2. Make A and B fail
3. Retrigger A
4. Retrigger B
5. See message "Some children jobs are still running"

**Expected behavior**
I would expect that the error message does not appear and I can retrigger B in parallel

**Screenshots**

**Desktop (please complete the following information):**
 - OS: Windows 10
 - Browser Chrome
 - Version  67.0.3396.99

**Additional context**



Changed files:
src/api/handlers/projects/jobs.py

diff --git a/src/api/handlers/projects/jobs.py b/src/api/handlers/projects/jobs.py
index 78d9b8d8..875fa6fa 100644
--- a/src/api/handlers/projects/jobs.py
+++ b/src/api/handlers/projects/jobs.py
@@ -240,7 +240,7 @@ class JobRestart(Resource):
             if j['id'] not in restart_jobs:
                 continue
 
-            if j['state'] not in restart_states and j['state'] != 'skipped':
+            if j['state'] not in restart_states and j['state'] not in ('skipped', 'queued'):
                 abort(400, 'Some children jobs are still running')
 
         for j in restart_jobs: