lib/command/server/bgsave.js
function execute(req, res) {
  this.log.notice('background saving started by pid %s', process.pid);
  function onSave(err) {
    /* istanbul ignore next: not prepared to mock this right now */
    if(err) return this.log.warning('background save failed: %s', err.message);
    this.log.notice('background saving terminated with success')
  }
  Persistence.save(this.state.store, this.state.conf, onSave.bind(this));
  res.send(null, Constants.BGSAVE);
}
function execute(req, res) {
  this.log.notice('background saving started by pid %s', process.pid);
  function onSave(err) {
    /* istanbul ignore next: not prepared to mock this right now */
    if(err) return this.log.warning('background save failed: %s', err.message);
    this.log.notice('background saving terminated with success')
  }
  Persistence.save(this.state.store, this.state.conf, onSave.bind(this));
  res.send(null, Constants.BGSAVE);
}
function execute ( req , res ) { this . log . notice ( 'background saving started by pid %s' , process . pid ) ; function onSave ( err ) { /* istanbul ignore next: not prepared to mock this right now */ if ( err ) return this . log . warning ( 'background save failed: %s' , err . message ) ; this . log . notice ( 'background saving terminated with success' ) } Persistence . save ( this . state . store , this . state . conf , onSave . bind ( this ) ) ; res . send ( null , Constants . BGSAVE ) ; }
Respond to the BGSAVE command.
Respond to the BGSAVE command .