Mercurial > piecrust2
comparison piecrust/workerpool.py @ 1046:aa4f1e04cf3e
serve: Don't spam the output when hitting CTRL+C while processing assets.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 23 Jan 2018 08:54:58 -0800 |
parents | bd544b65cfad |
children |
comparison
equal
deleted
inserted
replaced
1045:2f39ffa601a9 | 1046:aa4f1e04cf3e |
---|---|
77 | 77 |
78 | 78 |
79 def _real_worker_func(params): | 79 def _real_worker_func(params): |
80 try: | 80 try: |
81 _real_worker_func_unsafe(params) | 81 _real_worker_func_unsafe(params) |
82 except (KeyboardInterrupt, SystemExit): | |
83 # Return silently | |
84 pass | |
82 except Exception as ex: | 85 except Exception as ex: |
83 logger.exception(ex) | 86 logger.exception(ex) |
84 msg = ("CRITICAL ERROR IN WORKER %d\n%s" % (params.wid, str(ex))) | 87 msg = ("CRITICAL ERROR IN WORKER %d\n%s" % (params.wid, str(ex))) |
85 params.outqueue.put(( | 88 params.outqueue.put(( |
86 _CRITICAL_WORKER_ERROR, None, False, params.wid, msg)) | 89 _CRITICAL_WORKER_ERROR, None, False, params.wid, msg)) |