Skip to content

Commit 857260f

Browse files
Starting new jobs result in the termination (#142)
* - Fixed runner-specific objects (i.e. no longer static) * - Removed related static references
1 parent 1820f2f commit 857260f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

components/core-services-exec/src/main/groovy/org/squonk/execution/runners/OpenShiftRunner.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,11 @@ public class OpenShiftRunner extends AbstractRunner {
125125
private static final long WATCHER_POLL_PERIOD_MILLIS = 1000;
126126

127127
private static OpenShiftClient client;
128-
private static Watch watchObject;
129-
private static LogWatch logWatch;
130-
private static LogStream logStream;
128+
129+
// Objects used to watch the Pod's events and its logs
130+
private Watch watchObject;
131+
private LogWatch logWatch;
132+
private LogStream logStream;
131133

132134
private final String hostBaseWorkDir;
133135
private final String localWorkDir;
@@ -155,7 +157,7 @@ public class OpenShiftRunner extends AbstractRunner {
155157
* and is responsible for determining when the executed Pod has
156158
* run to completion.
157159
*/
158-
static class PodWatcher implements Watcher<Pod> {
160+
class PodWatcher implements Watcher<Pod> {
159161

160162
private String podName;
161163

@@ -366,7 +368,7 @@ public void onClose(KubernetesClientException cause) {
366368
* It is created from within the PodWatcher when we're confident the
367369
* Pod's running.
368370
*/
369-
static class LogStream extends OutputStream {
371+
class LogStream extends OutputStream {
370372

371373
// To accumulated the captured Pod's output...
372374
private StringBuilder stringBuilder = new StringBuilder();

0 commit comments

Comments
 (0)