 uuid = require 'node-uuid'
 Q = require 'q'
 logger = require 'winston'
-logger.level = config.logger.level
-logger.colorize = true
+logger.remove logger.transports.Console
 cluster = require 'cluster'
 numCPUs = require('os').cpus().length
 nconf = require 'nconf'

  cluster.on 'listening', (worker, address) ->
    logger.debug "worker #{worker.process.pid} is now connected to #{address.address}:#{address.port}"
else
  # Configure mongose to connect to mongo
  mongoose.connect config.mongo.url




  exports.startRestartServerAgenda = (done) ->
    # notify master to restart all workers in 2s
    setTimeout ->
      logger.debug 'Sending restart cluster message...'
      process.send('restart-all')
    , 2000
