mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Fix all lib/ files with ESLint rules with 0 errors.
This commit is contained in:
parent
994977ea94
commit
434f63b3a9
69 changed files with 793 additions and 764 deletions
|
@ -25,7 +25,7 @@ module.exports = function(options) {
|
|||
var log = logger.createLogger('notify-hipchat')
|
||||
var client = Promise.promisifyAll(new Hipchatter(options.token))
|
||||
var buffer = []
|
||||
, timer
|
||||
var timer
|
||||
|
||||
// Input
|
||||
var sub = zmqutil.socket('sub')
|
||||
|
@ -45,6 +45,25 @@ module.exports = function(options) {
|
|||
sub.subscribe(channel)
|
||||
})
|
||||
|
||||
function push() {
|
||||
buffer.splice(0).forEach(function(entry) {
|
||||
client.notifyAsync(options.room, {
|
||||
message: util.format(
|
||||
'<strong>%s</strong>/<strong>%s</strong> %d [<strong>%s</strong>] %s'
|
||||
, logger.LevelLabel[entry.priority]
|
||||
, entry.tag
|
||||
, entry.pid
|
||||
, entry.identifier
|
||||
, entry.message
|
||||
)
|
||||
, color: COLORS[entry.priority]
|
||||
, notify: entry.priority >= options.notifyPriority
|
||||
, message_format: 'html'
|
||||
, token: options.token
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
sub.on('message', wirerouter()
|
||||
.on(wire.DeviceLogMessage, function(channel, message) {
|
||||
if (message.priority >= options.priority) {
|
||||
|
@ -55,25 +74,6 @@ module.exports = function(options) {
|
|||
})
|
||||
.handler())
|
||||
|
||||
function push() {
|
||||
buffer.splice(0).forEach(function(entry) {
|
||||
client.notifyAsync(options.room, {
|
||||
message: util.format(
|
||||
'<strong>%s</strong>/<strong>%s</strong> %d [<strong>%s</strong>] %s'
|
||||
, logger.LevelLabel[entry.priority]
|
||||
, entry.tag
|
||||
, entry.pid
|
||||
, entry.identifier
|
||||
, entry.message
|
||||
)
|
||||
, color: COLORS[entry.priority]
|
||||
, notify: entry.priority >= options.notifyPriority
|
||||
, 'message_format': 'html'
|
||||
, token: options.token
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
log.info('Listening for %s (or higher) level log messages',
|
||||
logger.LevelLabel[options.priority])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue