Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var configuration = require('../configurator').load({ persistence: true })
var Sentry = require('../src/core/resources/presence/sentry')
var Client = require('radar_client').constructor
var fork = require('child_process').fork
var Tracker = require('callback_tracker')
Sentry.expiry = 4000
if (process.env.verbose) {
var Minilog = require('minilog')
// Configure log output
Minilog.pipe(Minilog.suggest.deny(/.*/, (process.env.radar_log ? process.env.radar_log : 'debug')))
.pipe(formatter)
.pipe(Minilog.backends.nodeConsole.formatColor)
.pipe(process.stdout)
require('radar_client')._log.pipe(Minilog.suggest.deny(/.*/, (process.env.radar_log ? process.env.radar_log : 'debug')))
.pipe(formatter)
.pipe(Minilog.backends.nodeConsole.formatColor)
.pipe(process.stdout)
}
http.globalAgent.maxSockets = 10000
module.exports = {
spawnRadar: function () {
var radarProcess
function getListener (action, callbackFn) {
var listener = function (message) {
message = JSON.parse(message)
logging.debug('message received', message, action)
if (message.action === action) {
getClient: function (account, userId, userType, userData, done) {
var client = new Client().configure({
userId: userId,
userType: userType,
accountName: account,
port: configuration.port,
upgrade: false,
userData: userData
}).once('ready', done).alloc('test')
return client
},
configuration: configuration,