(noop) temporarily disable Scrolls for testing

This commit is contained in:
Jamie Hannaford 2018-01-15 11:07:11 -08:00
Родитель 29831aabb2
Коммит 7258fab142
2 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -1,5 +1,5 @@
HttpClient = require 'scoped-http-client'
Scrolls = require('../../../lib/scrolls').context({script: 'pagerduty'})
#Scrolls = require('../../../lib/scrolls').context({script: 'pagerduty'})
pagerDutyApiKey = process.env.HUBOT_PAGERDUTY_API_KEY
pagerDutySubdomain = process.env.HUBOT_PAGERDUTY_SUBDOMAIN
@ -34,7 +34,7 @@ module.exports =
if pagerDutyServices? && url.match /\/incidents/
query['service_ids'] = pagerDutyServices.split ","
Scrolls.log('info', {at: 'get/request', url: url, query: query})
#Scrolls.log('info', {at: 'get/request', url: url, query: query})
@http(url)
.query(query)
@ -44,7 +44,7 @@ module.exports =
cb(err)
return
Scrolls.log('info', {at: 'get/response', url: url, query: query, status: res.statusCode, body: body})
#Scrolls.log('info', {at: 'get/response', url: url, query: query, status: res.statusCode, body: body})
unless res.statusCode is 200
cb(new PagerDutyError("#{res.statusCode} back from #{url}"))

Просмотреть файл

@ -41,7 +41,7 @@ pagerduty = require('../pagerduty')
async = require('async')
inspect = require('util').inspect
moment = require('moment-timezone')
Scrolls = require('../../../../lib/scrolls').context({script: 'pagerduty'})
#Scrolls = require('../../../../lib/scrolls').context({script: 'pagerduty'})
pagerDutyUserId = process.env.HUBOT_PAGERDUTY_USER_ID
pagerDutyServiceApiKey = process.env.HUBOT_PAGERDUTY_SERVICE_API_KEY
@ -645,7 +645,7 @@ module.exports = (robot) ->
cb(err)
return
Scrolls.log("info", {at: 'who-is-on-call/renderSchedule', schedule: schedule.name, username: username})
#Scrolls.log("info", {at: 'who-is-on-call/renderSchedule', schedule: schedule.name, username: username})
if !pagerEnabledForScheduleOrEscalation(schedule) || username == "hubot"
cb(null, undefined)
return
@ -672,12 +672,12 @@ module.exports = (robot) ->
async.map schedules, renderSchedule, (err, results) ->
if err?
Scrolls.log("error", {at: 'who-is-on-call/map-schedules/error', error: err})
#Scrolls.log("error", {at: 'who-is-on-call/map-schedules/error', error: err})
robot.emit 'error', err, msg
return
results = (result for result in results when result?)
Scrolls.log("info", {at: 'who-is-on-call/map-schedules'})
#Scrolls.log("info", {at: 'who-is-on-call/map-schedules'})
msg.send results.join("\n")
# hubot pager services - list services