mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 11:00:39 +02:00
delete unused function
This commit is contained in:
29
lib/cache.js
29
lib/cache.js
@@ -41,35 +41,6 @@ exp.get_redis = function() {
|
|||||||
return redis;
|
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*
|
// set model type to value of *slim*
|
||||||
exp.set_slim = function(rid, userId, slim, callback) {
|
exp.set_slim = function(rid, userId, slim, callback) {
|
||||||
logging.debug(rid, "setting slim for", userId, "to " + slim);
|
logging.debug(rid, "setting slim for", userId, "to " + slim);
|
||||||
|
|||||||
Reference in New Issue
Block a user