Browse Source

Merge "Differentiate between queued and waiting jobs in zuul web UI"

tags/3.10.0
Zuul 3 months ago
parent
commit
8817b553a9
2 changed files with 9 additions and 2 deletions
  1. 6
    2
      web/src/containers/status/ChangePanel.jsx
  2. 3
    0
      zuul/model.py

+ 6
- 2
web/src/containers/status/ChangePanel.jsx View File

@@ -222,7 +222,7 @@ class ChangePanel extends React.Component {
222 222
       case 'skipped':
223 223
         className = 'label-info'
224 224
         break
225
-      // 'in progress' 'queued' 'lost' 'aborted' ...
225
+      // 'in progress' 'queued' 'lost' 'aborted' 'waiting' ...
226 226
       default:
227 227
         className = 'label-default'
228 228
     }
@@ -258,7 +258,11 @@ class ChangePanel extends React.Component {
258 258
     let result = job.result ? job.result.toLowerCase() : null
259 259
     if (result === null) {
260 260
       if (job.url === null) {
261
-        result = 'queued'
261
+        if (job.queued === false) {
262
+          result = 'waiting'
263
+        } else {
264
+          result = 'queued'
265
+        }
262 266
       } else if (job.paused !== null && job.paused) {
263 267
         result = 'paused'
264 268
       } else {

+ 3
- 0
zuul/model.py View File

@@ -1197,6 +1197,7 @@ class Job(ConfigObject):
1197 1197
             _files=(),
1198 1198
             _irrelevant_files=(),
1199 1199
             secrets=(),  # secrets aren't inheritable
1200
+            queued=False,
1200 1201
         )
1201 1202
 
1202 1203
         self.inheritable_attributes = {}
@@ -2527,6 +2528,7 @@ class QueueItem(object):
2527 2528
                     # If this job needs a semaphore, either acquire it or
2528 2529
                     # make sure that we have it before requesting the nodes.
2529 2530
                     toreq.append(job)
2531
+                    job.queued = True
2530 2532
         return toreq
2531 2533
 
2532 2534
     def setResult(self, build):
@@ -2768,6 +2770,7 @@ class QueueItem(object):
2768 2770
                 'paused': build.paused if build else None,
2769 2771
                 'retry': build.retry if build else None,
2770 2772
                 'tries': self.current_build_set.getTries(job.name),
2773
+                'queued': job.queued,
2771 2774
                 'node_labels': build.node_labels if build else [],
2772 2775
                 'node_name': build.node_name if build else None,
2773 2776
                 'worker': worker,

Loading…
Cancel
Save