Revision c74cda62 daemons/import-export

b/daemons/import-export
53 53
#: Don't update status file more than once every 5 seconds (unless forced)
54 54
MIN_UPDATE_INTERVAL = 5.0
55 55

  
56
#: Give child process up to 5 seconds to exit after sending a signal
57
CHILD_LINGER_TIMEOUT = 5.0
58

  
59 56
#: How long to wait for a connection to be established
60 57
DEFAULT_CONNECT_TIMEOUT = 60
61 58

  
......
276 273
          logging.info("Child process didn't establish connection in time")
277 274
          child.Kill(signal.SIGTERM)
278 275
          exit_timeout = \
279
            utils.RunningTimeout(CHILD_LINGER_TIMEOUT, True)
276
            utils.RunningTimeout(constants.CHILD_LINGER_TIMEOUT, True)
280 277
          # Next block will calculate timeout
281 278
        else:
282 279
          # Not yet connected, check again in a second
......
323 320
                               " to exit", exit_timeout.Remaining())
324 321
                else:
325 322
                  logging.info("Giving child process %0.2f seconds to exit",
326
                               CHILD_LINGER_TIMEOUT)
323
                               constants.CHILD_LINGER_TIMEOUT)
327 324
                  exit_timeout = \
328
                    utils.RunningTimeout(CHILD_LINGER_TIMEOUT, True)
325
                    utils.RunningTimeout(constants.CHILD_LINGER_TIMEOUT, True)
329 326
          else:
330 327
            poller.unregister(fd)
331 328
            del fdmap[fd]

Also available in: Unified diff