mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 21:47:02 +03:00
cleaner logging
This commit is contained in:
@@ -31,8 +31,11 @@ if (config.mode === "test") {
|
|||||||
// Only set cache if data returned
|
// Only set cache if data returned
|
||||||
if (data.items.length > 0) {
|
if (data.items.length > 0) {
|
||||||
redis.set(redisKey, JSON.stringify(data), (setErr) => {
|
redis.set(redisKey, JSON.stringify(data), (setErr) => {
|
||||||
|
if(setErr) {
|
||||||
|
logger.warn(setErr);
|
||||||
|
} else {
|
||||||
logger.debug("redis: video information cache set for: " + videoID);
|
logger.debug("redis: video information cache set for: " + videoID);
|
||||||
setErr && logger.warn(setErr);
|
}
|
||||||
callback(false, data); // don't fail
|
callback(false, data); // don't fail
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -50,10 +53,4 @@ if (config.mode === "test") {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* YouTubeAPI.videos.list({
|
|
||||||
part: "snippet",
|
|
||||||
id: videoID
|
|
||||||
}, function (err, data) {*/
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = exportObject;
|
module.exports = exportObject;
|
||||||
Reference in New Issue
Block a user