lib/createWorkers.js
function _parseMessage(message) {
    try {
      const contentString = message && message.content && message.content.toString();
      return JSON.parse(contentString);
    } catch (err) {
      _emit(TASK_FAILED);
      logger.warn(
        { err, message, options: configWithoutFuncs },
        '[worker#listen] Content is not a valid JSON'
      );
      return null;
    }
  }
function _parseMessage(message) {
    try {
      const contentString = message && message.content && message.content.toString();
      return JSON.parse(contentString);
    } catch (err) {
      _emit(TASK_FAILED);
      logger.warn(
        { err, message, options: configWithoutFuncs },
        '[worker#listen] Content is not a valid JSON'
      );
      return null;
    }
  }
function _parseMessage ( message ) { try { const contentString = message && message . content && message . content . toString ( ) ; return JSON . parse ( contentString ) ; } catch ( err ) { _emit ( TASK_FAILED ) ; logger . warn ( { err , message , options : configWithoutFuncs } , '[worker#listen] Content is not a valid JSON' ) ; return null ; } }
Parse a message and return content

@param {Object} message the message from the queue
@returns {String|null} message content or null if parsing failed
@private
Parse a message and return content