File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/com/lectra/ci/service Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 35
35
<!-- More Project Information -->
36
36
<name >Lectra Popcorn Plugin</name >
37
37
<description >This plugin allows integration of Popcorn</description >
38
- <inceptionYear >2022 </inceptionYear >
38
+ <inceptionYear >2023 </inceptionYear >
39
39
40
40
<organization >
41
41
<name >LECTRA</name >
Original file line number Diff line number Diff line change 16
16
package com .lectra .ci .service ;
17
17
18
18
import com .lectra .ci .domain .model .Metrics ;
19
- import hudson .model .Computer ;
19
+ import hudson .model .Job ;
20
20
import jenkins .model .Jenkins ;
21
21
22
22
/** Status service gather and expose information on the system. */
@@ -63,9 +63,10 @@ private int computeQueueSize() {
63
63
*/
64
64
private int computeRunningJobs () {
65
65
int cpt = 0 ;
66
- Computer [] computers = jenkinsInstance .getComputers ();
67
- for (Computer computer : computers ) {
68
- cpt += computer .countBusy ();
66
+ for (Job job : jenkinsInstance .getAllItems (Job .class )) {
67
+ if ( job .isBuilding () ) {
68
+ cpt ++;
69
+ }
69
70
}
70
71
return cpt ;
71
72
}
You can’t perform that action at this time.
0 commit comments