mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
delete unused function
This commit is contained in:
parent
ea1ae64283
commit
d81e2777d2
29
lib/cache.js
29
lib/cache.js
@ -41,35 +41,6 @@ exp.get_redis = function() {
|
||||
return redis;
|
||||
};
|
||||
|
||||
|
||||
// updates the redis instance's server_info object
|
||||
// callback: error, info object
|
||||
exp.info = function(callback) {
|
||||
redis.info(function(err, res) {
|
||||
// parse the info command and store it in redis.server_info
|
||||
|
||||
// this code block was taken from mranney/node_redis#on_info_cmd
|
||||
// http://git.io/LBUNbg
|
||||
var lines = res.toString().split("\r\n");
|
||||
var obj = {};
|
||||
lines.forEach(function(line) {
|
||||
var parts = line.split(":");
|
||||
if (parts[1]) {
|
||||
obj[parts[0]] = parts[1];
|
||||
}
|
||||
});
|
||||
obj.versions = [];
|
||||
if (obj.redis_version) {
|
||||
obj.redis_version.split(".").forEach(function(num) {
|
||||
obj.versions.push(+num);
|
||||
});
|
||||
}
|
||||
redis.server_info = obj;
|
||||
|
||||
callback(err, redis.server_info);
|
||||
});
|
||||
};
|
||||
|
||||
// set model type to value of *slim*
|
||||
exp.set_slim = function(rid, userId, slim, callback) {
|
||||
logging.debug(rid, "setting slim for", userId, "to " + slim);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user