{"action":"created","issue":{"url":"https://api.github.com/repos/sergeyksv/tingodb/issues/107","repository_url":"https://api.github.com/repos/sergeyksv/tingodb","labels_url":"https://api.github.com/repos/sergeyksv/tingodb/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/sergeyksv/tingodb/issues/107/comments","events_url":"https://api.github.com/repos/sergeyksv/tingodb/issues/107/events","html_url":"https://github.com/sergeyksv/tingodb/issues/107","id":134054601,"number":107,"title":"how to trigger compactCollection from mongoose? ","user":{"login":"ElderOrb","id":23638,"avatar_url":"https://avatars.githubusercontent.com/u/23638?v=3","gravatar_id":"","url":"https://api.github.com/users/ElderOrb","html_url":"https://github.com/ElderOrb","followers_url":"https://api.github.com/users/ElderOrb/followers","following_url":"https://api.github.com/users/ElderOrb/following{/other_user}","gists_url":"https://api.github.com/users/ElderOrb/gists{/gist_id}","starred_url":"https://api.github.com/users/ElderOrb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElderOrb/subscriptions","organizations_url":"https://api.github.com/users/ElderOrb/orgs","repos_url":"https://api.github.com/users/ElderOrb/repos","events_url":"https://api.github.com/users/ElderOrb/events{/privacy}","received_events_url":"https://api.github.com/users/ElderOrb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-16T18:09:18Z","updated_at":"2016-02-16T18:31:45Z","closed_at":null,"body":"At the moment I'm using the following to export 'compactDatabase' and then call it from my code: \r\n\r\n  module.exports['compact'] = Q.nfbind(mongoose.connections[0].db.compactDatabase.bind(mongoose.connections[0].db));\r\n\r\n.. but I'm not sure how to access compactCollection from mongoose. Any hints on this?  "},"comment":{"url":"https://api.github.com/repos/sergeyksv/tingodb/issues/comments/184816299","html_url":"https://github.com/sergeyksv/tingodb/issues/107#issuecomment-184816299","issue_url":"https://api.github.com/repos/sergeyksv/tingodb/issues/107","id":184816299,"user":{"login":"sergeyksv","id":1007040,"avatar_url":"https://avatars.githubusercontent.com/u/1007040?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyksv","html_url":"https://github.com/sergeyksv","followers_url":"https://api.github.com/users/sergeyksv/followers","following_url":"https://api.github.com/users/sergeyksv/following{/other_user}","gists_url":"https://api.github.com/users/sergeyksv/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyksv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyksv/subscriptions","organizations_url":"https://api.github.com/users/sergeyksv/orgs","repos_url":"https://api.github.com/users/sergeyksv/repos","events_url":"https://api.github.com/users/sergeyksv/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyksv/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T18:31:44Z","updated_at":"2016-02-16T18:31:44Z","body":"I afraid this is only single method to do it because this is non standard function. Just in case compactionation will happens automatically after reaching certain garbage ratio."}}