|
18 | 18 | from .five import values, with_metaclass
|
19 | 19 | from .utils.imports import instantiate, qualname
|
20 | 20 | from .utils.log import get_logger
|
21 |
| -from .utils.threads import default_socket_timeout |
22 | 21 |
|
23 | 22 | try:
|
24 | 23 | from greenlet import GreenletExit
|
|
28 | 27 |
|
29 | 28 | __all__ = ['Blueprint', 'Step', 'StartStopStep', 'ConsumerStep']
|
30 | 29 |
|
31 |
| -#: Default socket timeout at shutdown. |
32 |
| -SHUTDOWN_SOCKET_TIMEOUT = 5.0 |
33 |
| - |
34 | 30 | #: States
|
35 | 31 | RUN = 0x1
|
36 | 32 | CLOSE = 0x2
|
@@ -149,22 +145,21 @@ def send_all(self, parent, method,
|
149 | 145 | description=None, reverse=True, propagate=True, args=()):
|
150 | 146 | description = description or method.capitalize()
|
151 | 147 | steps = reversed(parent.steps) if reverse else parent.steps
|
152 |
| - with default_socket_timeout(SHUTDOWN_SOCKET_TIMEOUT): # Issue 975 |
153 |
| - for step in steps: |
154 |
| - if step: |
155 |
| - self._debug('%s %s...', |
156 |
| - description.capitalize(), step.alias) |
157 |
| - fun = getattr(step, method, None) |
158 |
| - if fun: |
159 |
| - try: |
160 |
| - fun(parent, *args) |
161 |
| - except Exception as exc: |
162 |
| - if propagate: |
163 |
| - raise |
164 |
| - logger.error( |
165 |
| - 'Error while %s %s: %r', |
166 |
| - description, step.alias, exc, exc_info=1, |
167 |
| - ) |
| 148 | + for step in steps: |
| 149 | + if step: |
| 150 | + self._debug('%s %s...', |
| 151 | + description.capitalize(), step.alias) |
| 152 | + fun = getattr(step, method, None) |
| 153 | + if fun: |
| 154 | + try: |
| 155 | + fun(parent, *args) |
| 156 | + except Exception as exc: |
| 157 | + if propagate: |
| 158 | + raise |
| 159 | + logger.error( |
| 160 | + 'Error while %s %s: %r', |
| 161 | + description, step.alias, exc, exc_info=1, |
| 162 | + ) |
168 | 163 |
|
169 | 164 | def stop(self, parent, close=True, terminate=False):
|
170 | 165 | what = 'terminating' if terminate else 'stopping'
|
|
0 commit comments