@@ -291,7 +291,6 @@ public void shutdown(boolean removejob) {
291
291
try {
292
292
if (job != null ) {
293
293
job .shutdown ();
294
- Thread .sleep (500 );// NOSONAR
295
294
}
296
295
} catch (final Exception e ) {
297
296
log .error (String .format (SaturnConstant .LOG_FORMAT_FOR_STRING , jobName , e .getMessage ()), e );
@@ -310,12 +309,13 @@ public void shutdown(boolean removejob) {
310
309
limitMaxJobsService .shutdown ();
311
310
312
311
zkCacheManager .shutdown ();
313
- try {
314
- Thread .sleep (500 );// NOSONAR
315
- } catch (InterruptedException ignore ) {
316
- log .warn (ignore .getMessage ());
317
- }
312
+
318
313
if (removejob ) {
314
+ try {
315
+ Thread .sleep (500 );// NOSONAR
316
+ } catch (InterruptedException ignore ) {
317
+ log .warn (ignore .getMessage ());
318
+ }
319
319
jobNodeStorage .deleteJobNode ();
320
320
saturnExecutorService .removeJobName (jobName );
321
321
}
@@ -327,32 +327,6 @@ public void shutdown(boolean removejob) {
327
327
}
328
328
}
329
329
330
- public void shutdownGracefully () {
331
- synchronized (isShutdownFlag ) {
332
- isShutdownFlag .set (true );
333
- if (job != null ) {
334
- job .shutdownGracefully ();
335
- }
336
- listenerManager .shutdown ();
337
- shardingService .shutdown ();
338
- configService .shutdown ();
339
- leaderElectionService .shutdown ();
340
- serverService .shutdown ();
341
- executionContextService .shutdown ();
342
- executionService .shutdown ();
343
- failoverService .shutdown ();
344
- statisticsService .shutdown ();
345
- analyseService .shutdown ();
346
- limitMaxJobsService .shutdown ();
347
- zkCacheManager .shutdown ();
348
-
349
- JobRegistry .clearJob (executorName , jobName );
350
- if (executorService != null && !executorService .isShutdown ()) {
351
- executorService .shutdown ();
352
- }
353
- }
354
- }
355
-
356
330
/**
357
331
* 重新调度作业.
358
332
*
0 commit comments