price@pap-laptop:~/LSST/pipe_base (tickets/DM-10633=) $ git sub-patch
|
commit 355fc941f07c724a4c25081f0abfa8bb661c97e6
|
Author: Paul Price <price@astro.princeton.edu>
|
Date: Fri Jun 2 14:01:13 2017 -0400
|
|
TaskRunner: revise insane timeout
|
|
This value is more reasonable, and doesn't trigger Y2K38 bugs (e.g.,
|
https://bugs.python.org/issue25155 ), but should be large enough to
|
prevent annoyance.
|
|
diff --git a/python/lsst/pipe/base/cmdLineTask.py b/python/lsst/pipe/base/cmdLineTask.py
|
index cfc4d26..34d6174 100644
|
--- a/python/lsst/pipe/base/cmdLineTask.py
|
+++ b/python/lsst/pipe/base/cmdLineTask.py
|
@@ -140,7 +140,7 @@ class TaskRunner(object):
|
[1] http://bugs.python.org/issue8296
|
[2] http://stackoverflow.com/questions/1408356/keyboard-interrupts-with-pythons-multiprocessing-pool)
|
"""
|
- TIMEOUT = 999999999999 # Default timeout (sec) for multiprocessing
|
+ TIMEOUT = 3600*24*30 # Default timeout (sec) for multiprocessing
|
|
def __init__(self, TaskClass, parsedCmd, doReturnResults=False):
|
"""!Construct a TaskRunner
|
|
commit b33ffe24b6716cee286993c3493f7da27d464296
|
Author: Paul Price <price@astro.princeton.edu>
|
Date: Fri Jun 2 14:01:42 2017 -0400
|
|
TaskRunner: fix doc
|
|
We don't use TIMEOUT_DEFAULT, but TIMEOUT (there is no TIMEOUT_DEFAULT).
|
|
diff --git a/python/lsst/pipe/base/cmdLineTask.py b/python/lsst/pipe/base/cmdLineTask.py
|
index 34d6174..d5f93d1 100644
|
--- a/python/lsst/pipe/base/cmdLineTask.py
|
+++ b/python/lsst/pipe/base/cmdLineTask.py
|
@@ -135,7 +135,7 @@ class TaskRunner(object):
|
Due to a python bug [1], handling a KeyboardInterrupt properly requires
|
specifying a timeout [2]. This timeout (in sec) can be specified as the
|
"timeout" element in the output from ArgumentParser (the "parsedCmd"), if
|
- available, otherwise we use TaskRunner.TIMEOUT_DEFAULT.
|
+ available, otherwise we use TaskRunner.TIMEOUT.
|
|
[1] http://bugs.python.org/issue8296
|
[2] http://stackoverflow.com/questions/1408356/keyboard-interrupts-with-pythons-multiprocessing-pool)
|
On Python 3.5.x, this change produces:
OverflowError: timestamp too large to convert to C _PyTime_t
https://bugs.python.org/issue25155