don't log docLines when document removed from redis

they can now be binary gzipped data which messes up the logs
This commit is contained in:
Brian Gough 2015-03-25 16:54:36 +00:00
parent e3d73d4456
commit 6bffa4d9e0

View file

@ -32,7 +32,6 @@ module.exports = RedisManager =
removeDocFromMemory : (project_id, doc_id, callback)-> removeDocFromMemory : (project_id, doc_id, callback)->
logger.log project_id:project_id, doc_id:doc_id, "removing doc from redis" logger.log project_id:project_id, doc_id:doc_id, "removing doc from redis"
multi = rclient.multi() multi = rclient.multi()
multi.get keys.docLines(doc_id:doc_id)
multi.del keys.docLines(doc_id:doc_id) multi.del keys.docLines(doc_id:doc_id)
multi.del keys.projectKey(doc_id:doc_id) multi.del keys.projectKey(doc_id:doc_id)
multi.del keys.docVersion(doc_id:doc_id) multi.del keys.docVersion(doc_id:doc_id)
@ -43,8 +42,7 @@ module.exports = RedisManager =
logger.err project_id:project_id, doc_id:doc_id, err:err, "error removing doc from redis" logger.err project_id:project_id, doc_id:doc_id, err:err, "error removing doc from redis"
callback(err, null) callback(err, null)
else else
docLines = replys[0] logger.log project_id:project_id, doc_id:doc_id, "removed doc from redis"
logger.log project_id:project_id, doc_id:doc_id, docLines:docLines, "removed doc from redis"
callback() callback()
getDoc : (doc_id, callback = (error, lines, version) ->)-> getDoc : (doc_id, callback = (error, lines, version) ->)->