1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

No need for deferred in gracefullyKillWorker().

This commit is contained in:
Simo Kinnunen 2014-01-08 19:39:30 +09:00
parent f3c8572cb6
commit 3826705ccd

View file

@ -131,17 +131,14 @@ function forceKillWorker(id) {
}
function gracefullyKillWorker(id) {
var deferred = Q.defer()
tryKillWorker(id)
return tryKillWorker(id)
.timeout(10000)
.then(deferred.resolve)
.catch(function() {
log.error('Device worker "%s" did not stop in time', id)
forceKillWorker(id).then(deferred.resolve)
return forceKillWorker(id)
.timeout(10000)
.then(deferred.resolve)
})
return deferred.promise
}
function gracefullyExit() {