projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for bug 1450 high memory consumption
[osm/MON.git]
/
osm_mon
/
evaluator
/
evaluator.py
diff --git
a/osm_mon/evaluator/evaluator.py
b/osm_mon/evaluator/evaluator.py
index
d8589bb
..
6ca0dc5
100644
(file)
--- a/
osm_mon/evaluator/evaluator.py
+++ b/
osm_mon/evaluator/evaluator.py
@@
-75,20
+75,30
@@
class Evaluator:
# Some processes have not completed due to timeout error
log.info('Some processes have not finished due to TimeoutError exception')
log.debug('concurrent.futures.TimeoutError exception %s' % (e))
# Some processes have not completed due to timeout error
log.info('Some processes have not finished due to TimeoutError exception')
log.debug('concurrent.futures.TimeoutError exception %s' % (e))
- Evaluator._stop_process_pool(executor)
+
+ # Shutting down process pool executor
+ Evaluator._stop_process_pool(executor)
@staticmethod
def _stop_process_pool(executor):
log.debug("_stop_process_pool")
@staticmethod
def _stop_process_pool(executor):
log.debug("_stop_process_pool")
- log.info('S
topping all processes in the
process pool')
+ log.info('S
hutting down
process pool')
try:
try:
+ log.debug('Stopping residual processes in the process pool')
for pid, process in executor._processes.items():
if process.is_alive():
process.terminate()
except Exception as e:
log.info("Exception during process termination")
log.debug("Exception %s" % (e))
for pid, process in executor._processes.items():
if process.is_alive():
process.terminate()
except Exception as e:
log.info("Exception during process termination")
log.debug("Exception %s" % (e))
- executor.shutdown()
+
+ try:
+ # Shutting down executor
+ log.debug('Shutting down process pool executor')
+ executor.shutdown()
+ except RuntimeError as e:
+ log.info('RuntimeError in shutting down executer')
+ log.debug('RuntimeError %s' % (e))
return
@staticmethod
return
@staticmethod