Explorar o código

allow archiving to exit properly on hard timeout

Brian Gough %!s(int64=9) %!d(string=hai) anos
pai
achega
c6e83c6cb8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      services/track-changes/app/coffee/PackWorker.coffee

+ 2 - 1
services/track-changes/app/coffee/PackWorker.coffee

@@ -37,10 +37,11 @@ shutDownTimer = setTimeout () ->
 	# start the shutdown on the next pack
 	shutDownRequested = true
 	# do a hard shutdown after a further 5 minutes
-	setTimeout () ->
+	hardTimeout = setTimeout () ->
 		logger.error "HARD TIMEOUT in pack archive worker"
 		process.exit()
 	, 5*60*1000
+	hardTimeout.unref()
 , TIMEOUT
 
 logger.log "checking for updates, limit=#{LIMIT}, delay=#{DOCUMENT_PACK_DELAY}, timeout=#{TIMEOUT}"