forked from j62/ctbrec
Change order how things are shutdown
This commit is contained in:
parent
d63c98cf36
commit
963f0f0f5f
|
@ -456,7 +456,7 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
recorderLock.unlock();
|
||||
}
|
||||
|
||||
// wait for post-processing to finish
|
||||
// wait for downloads to finish
|
||||
LOG.info("Waiting for downloads to finish");
|
||||
for (int i = 0; i < 60; i++) {
|
||||
if (!recordingProcesses.isEmpty()) {
|
||||
|
@ -471,11 +471,12 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
|
||||
// shutdown threadpools
|
||||
try {
|
||||
LOG.info("Shutting down pools");
|
||||
LOG.info("Shutting down download pool");
|
||||
downloadPool.shutdown();
|
||||
ppPool.shutdown();
|
||||
client.shutdown();
|
||||
downloadPool.awaitTermination(1, TimeUnit.MINUTES);
|
||||
LOG.info("Shutting down post-processing pool");
|
||||
ppPool.shutdown();
|
||||
int minutesToWait = 10;
|
||||
LOG.info("Waiting {} minutes (max) for post-processing to finish", minutesToWait);
|
||||
ppPool.awaitTermination(minutesToWait, TimeUnit.MINUTES);
|
||||
|
|
Loading…
Reference in New Issue