Explorar el Código

added a time delay to the pack migration script

Brian Gough hace 11 años
padre
commit
ff7860b6dc
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      services/track-changes/pack.coffee

+ 3 - 1
services/track-changes/pack.coffee

@@ -105,7 +105,9 @@ readFile todoFile, (err, todo) ->
 					fs.appendFileSync doneFile, doc_id + '\n'
 					fs.appendFileSync doneFile, doc_id + '\n'
 				if shutdownRequested
 				if shutdownRequested
 					return callback('shutdown')
 					return callback('shutdown')
-				callback(err, result)
+				setTimeout () ->
+					callback(err, result)
+				, 1000
 		, (err, results) ->
 		, (err, results) ->
 			if err?
 			if err?
 				console.log 'error:', err
 				console.log 'error:', err