File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator
processing/event/source/informer Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ public class ExecutorServiceManager {
4040 private static final Logger log = LoggerFactory .getLogger (ExecutorServiceManager .class );
4141 private ExecutorService executor ;
4242 private ExecutorService workflowExecutor ;
43- private ScheduledExecutorService cachingExecutorService ;
43+ private ExecutorService cachingExecutorService ;
44+ private ScheduledExecutorService scheduledExecutorService ;
4445 private boolean started ;
4546 private ConfigurationService configurationService ;
4647
@@ -123,14 +124,19 @@ private synchronized void lazyInitWorkflowExecutorService() {
123124 }
124125 }
125126
126- public ScheduledExecutorService cachingExecutorService () {
127+ public ExecutorService cachingExecutorService () {
127128 return cachingExecutorService ;
128129 }
129130
131+ public ScheduledExecutorService scheduledExecutorService () {
132+ return scheduledExecutorService ;
133+ }
134+
130135 public void start (ConfigurationService configurationService ) {
131136 if (!started ) {
132137 this .configurationService = configurationService ; // used to lazy init workflow executor
133- this .cachingExecutorService = Executors .newScheduledThreadPool (0 );
138+ this .cachingExecutorService = Executors .newCachedThreadPool ();
139+ this .scheduledExecutorService = Executors .newScheduledThreadPool (0 );
134140 this .executor = new InstrumentedExecutorService (configurationService .getExecutorService ());
135141 started = true ;
136142 }
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public synchronized void start() {
160160 controllerConfiguration
161161 .getConfigurationService ()
162162 .getExecutorServiceManager ()
163- .cachingExecutorService (),
163+ .scheduledExecutorService (),
164164 this );
165165 this .cache = new InformerManager <>(client , configuration , this );
166166 cache .setControllerConfiguration (controllerConfiguration );
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright Java Operator SDK Authors
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+ #
16+
17+ mci -Dlicense.skip jib:dockerBuild && kind load docker-image leader-election-operator:latest
You can’t perform that action at this time.
0 commit comments