wejs / we

[Deprecated] See @go-catupiri as a direct golang port
MIT License
214 stars 54 forks source link

Add support for PM2 gracefullReload #164

Closed albertosouza closed 7 years ago

albertosouza commented 7 years ago

See related docs in: https://keymetrics.io/2015/03/26/pm2-clustering-made-easy/

process.on('message', function(msg) {  
  if (msg === 'shutdown') {
    close_all_connections();
    delete_cache();
    server.close();
    process.exit(0);
  }
});