Skip to content

Commit c8e2362

Browse files
committed
prettier
1 parent b9a61f4 commit c8e2362

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

index.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -264,39 +264,39 @@ exports.redis_subscribe_all_results = async function (next) {
264264

265265
try {
266266
await this.pubsub.pSubscribe('result-*', (message, channel) => {
267-
const match = /result-([A-F0-9\-.]+)$/.exec(channel) // uuid
268-
if (!match) {
269-
plugin.logerror('pattern: result-*')
270-
return
271-
}
267+
const match = /result-([A-F0-9\-.]+)$/.exec(channel) // uuid
268+
if (!match) {
269+
plugin.logerror('pattern: result-*')
270+
return
271+
}
272272

273-
const m = JSON.parse(message)
273+
const m = JSON.parse(message)
274274

275-
if (typeof m.result !== 'object') {
276-
plugin.logerror(`garbage was published on ${channel}: ${m.result}`)
277-
return
278-
}
275+
if (typeof m.result !== 'object') {
276+
plugin.logerror(`garbage was published on ${channel}: ${m.result}`)
277+
return
278+
}
279279

280-
if (this.cfg.ignore[m.result.ip] !== undefined) return
280+
if (this.cfg.ignore[m.result.ip] !== undefined) return
281281

282-
const uuid = match[1]
282+
const uuid = match[1]
283283

284-
const phase = phase_handlers[m.plugin]
285-
if (phase && phase.call(this, uuid, m.result)) return
284+
const phase = phase_handlers[m.plugin]
285+
if (phase && phase.call(this, uuid, m.result)) return
286286

287-
// cross-plugin cells (e.g. karma asn_score -> asn) light up even when the
288-
// result is dropped for its own cell
289-
const cells = display.extra_cells(m.plugin, m.result)
290-
if (!display.should_drop(m.plugin, m.result)) {
291-
cells[display.get_plugin_name(m.plugin)] = display.format_result(
292-
m.plugin,
293-
m.result,
294-
)
295-
}
296-
stick_severity(this, uuid, cells)
287+
// cross-plugin cells (e.g. karma asn_score -> asn) light up even when the
288+
// result is dropped for its own cell
289+
const cells = display.extra_cells(m.plugin, m.result)
290+
if (!display.should_drop(m.plugin, m.result)) {
291+
cells[display.get_plugin_name(m.plugin)] = display.format_result(
292+
m.plugin,
293+
m.result,
294+
)
295+
}
296+
stick_severity(this, uuid, cells)
297297

298-
if (Object.keys(cells).length) wss.broadcast({ uuid, ...cells })
299-
})
298+
if (Object.keys(cells).length) wss.broadcast({ uuid, ...cells })
299+
})
300300
this.logdebug(this, `pSubscribed to result-*`)
301301
} catch (err) {
302302
this.logerror(`pubsub pSubscribe failed: ${err.message}`)

0 commit comments

Comments
 (0)