From a905c6a08403e7f3be1d982bfee9bf57d1ab508b Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Sat, 30 Nov 2013 13:13:18 -0500 Subject: [PATCH] During 11k users migration, was hitting too many open files errors --- src/user.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/user.js b/src/user.js index adb55bcf3a..090f4d3758 100644 --- a/src/user.js +++ b/src/user.js @@ -3,10 +3,11 @@ var bcrypt = require('bcrypt'), emailjs = require('emailjs'), nconf = require('nconf'), winston = require('winston'), + gravatar = require('gravatar'), userSearch = require('reds').createSearch('nodebbusersearch'), check = require('validator').check, sanitize = require('validator').sanitize, - + utils = require('./../public/src/utils'), RDB = require('./redis'), meta = require('./meta'), @@ -368,7 +369,7 @@ var bcrypt = require('bcrypt'), options.forcedefault = 'y'; } - return require('gravatar').url(email, options, https); + return gravatar.url(email, options, https); }; User.hashPassword = function(password, callback) { @@ -1024,4 +1025,4 @@ var bcrypt = require('bcrypt'), }); } }; -}(exports)); \ No newline at end of file +}(exports));