@@ -8,8 +8,6 @@ const changeCase = require('change-case');
88const SnailEscape = require ( 'snailescape.js' ) ;
99const bunyan = require ( 'bunyan' ) ;
1010
11- let heapdump = null ;
12-
1311const log = bunyan . createLogger ( {
1412 name : 'euircbot' ,
1513 serializers : { err : bunyan . stdSerializers . err } ,
@@ -24,15 +22,6 @@ const bot = {};
2422bot . util = { } ; // Util functions
2523
2624bot . init = function botInit ( cb ) {
27- if ( bot . config . heapdump ) {
28- log . debug ( 'enabling heap dumps' ) ;
29- heapdump = require ( 'heapdump' ) ;
30- process . on ( 'SIGINT' , ( ) => {
31- log . warn ( 'dumping heap, if configured, and exiting' ) ;
32- bot . dump ( ) ;
33- process . exit ( ) ;
34- } ) ;
35- }
3625 bot . configfolder = bot . config . configfolder ;
3726 bot . tmpfolder = bot . config . tmpfolder ;
3827 bot . datafolder = bot . config . datafolder ;
@@ -503,17 +492,6 @@ bot.fsListData = function botFsListData(namespace, listPath, cb) {
503492 fs . readdir ( finalPath , cb ) ;
504493} ;
505494
506- bot . dump = function botDump ( ) {
507- if ( heapdump ) {
508- heapdump . writeSnapshot ( ( err , filename ) => {
509- log . warn ( 'heapdump written to' , filename ) ;
510- } ) ;
511- } else {
512- log . trace ( 'dump called, but heapdump off' ) ;
513- }
514- } ;
515-
516-
517495bot . run = function botRun ( ) {
518496 async . series ( [
519497 function loadConf ( cb ) {
0 commit comments