Ejemplo n.º 1
0
 this.stop(function() {
   self.monitorConsole = admin.createMonitorConsole({
     id: self.serverInfo.id,
     type: self.app.getServerType(),
     host: masterInfo.host,
     port: masterInfo.port,
     info: self.serverInfo,
     env: self.app.get(Constants.RESERVED.ENV)
   });
   self.startConsole(function() {
     logger.info('restart modules for server : %j finish.', self.app.serverId);
   });
 });
Ejemplo n.º 2
0
var Monitor = function(app, opts) {
  opts = opts || {};
  this.app = app;
  this.serverInfo = app.getCurServer();
  this.masterInfo = app.getMaster();
  this.modules = [];
  this.closeWatcher = opts.closeWatcher;

  this.monitorConsole = admin.createMonitorConsole({
    id: this.serverInfo.id,
    type: this.app.getServerType(),
    host: this.masterInfo.host,
    port: this.masterInfo.port,
    info: this.serverInfo,
    env: this.app.get(Constants.RESERVED.ENV),
    authServer: app.get('adminAuthServerMonitor') // auth server function
  });
};