mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Allow worker to actually fail gracefully.
This commit is contained in:
parent
3f62a51d83
commit
3c647225f3
2 changed files with 25 additions and 9 deletions
|
@ -6,3 +6,17 @@ assert.ok(process.env.ANDROID_SERIAL,
|
|||
var log = require('./util/logger')
|
||||
.setGlobalIdentifier(process.env.ANDROID_SERIAL)
|
||||
.createLogger('device')
|
||||
|
||||
function gracefullyExit() {
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
process.on('SIGINT', function() {
|
||||
gracefullyExit()
|
||||
})
|
||||
|
||||
process.on('SIGTERM', function() {
|
||||
gracefullyExit()
|
||||
})
|
||||
|
||||
log.info('Started')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue