{"sha":"7fc90ca7f2c923d90321523314ff877312113f64","node_id":"MDY6Q29tbWl0MjQ0MDg0ODQ1OjdmYzkwY2E3ZjJjOTIzZDkwMzIxNTIzMzE0ZmY4NzczMTIxMTNmNjQ=","commit":{"author":{"name":"junho85","email":"junho85@gmail.com","date":"2020-04-10T15:45:49Z"},"committer":{"name":"junho85","email":"junho85@gmail.com","date":"2020-04-10T15:45:49Z"},"message":"garden.py - add get_database","tree":{"sha":"97879c0957403571222deb4bbea5ac17b7e2d845","url":"https://api.github.com/repos/junho85/garden5/git/trees/97879c0957403571222deb4bbea5ac17b7e2d845"},"url":"https://api.github.com/repos/junho85/garden5/git/commits/7fc90ca7f2c923d90321523314ff877312113f64","comment_count":0,"verification":{"verified":false,"reason":"unsigned","signature":null,"payload":null,"verified_at":null}},"url":"https://api.github.com/repos/junho85/garden5/commits/7fc90ca7f2c923d90321523314ff877312113f64","html_url":"https://github.com/junho85/garden5/commit/7fc90ca7f2c923d90321523314ff877312113f64","comments_url":"https://api.github.com/repos/junho85/garden5/commits/7fc90ca7f2c923d90321523314ff877312113f64/comments","author":{"login":"junho85","id":1219373,"node_id":"MDQ6VXNlcjEyMTkzNzM=","avatar_url":"https://avatars.githubusercontent.com/u/1219373?v=4","gravatar_id":"","url":"https://api.github.com/users/junho85","html_url":"https://github.com/junho85","followers_url":"https://api.github.com/users/junho85/followers","following_url":"https://api.github.com/users/junho85/following{/other_user}","gists_url":"https://api.github.com/users/junho85/gists{/gist_id}","starred_url":"https://api.github.com/users/junho85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junho85/subscriptions","organizations_url":"https://api.github.com/users/junho85/orgs","repos_url":"https://api.github.com/users/junho85/repos","events_url":"https://api.github.com/users/junho85/events{/privacy}","received_events_url":"https://api.github.com/users/junho85/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"junho85","id":1219373,"node_id":"MDQ6VXNlcjEyMTkzNzM=","avatar_url":"https://avatars.githubusercontent.com/u/1219373?v=4","gravatar_id":"","url":"https://api.github.com/users/junho85","html_url":"https://github.com/junho85","followers_url":"https://api.github.com/users/junho85/followers","following_url":"https://api.github.com/users/junho85/following{/other_user}","gists_url":"https://api.github.com/users/junho85/gists{/gist_id}","starred_url":"https://api.github.com/users/junho85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junho85/subscriptions","organizations_url":"https://api.github.com/users/junho85/orgs","repos_url":"https://api.github.com/users/junho85/repos","events_url":"https://api.github.com/users/junho85/events{/privacy}","received_events_url":"https://api.github.com/users/junho85/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"33a2cd5b822154155e6c5fe3e0c176a49e74397a","url":"https://api.github.com/repos/junho85/garden5/commits/33a2cd5b822154155e6c5fe3e0c176a49e74397a","html_url":"https://github.com/junho85/garden5/commit/33a2cd5b822154155e6c5fe3e0c176a49e74397a"}],"stats":{"total":12,"additions":7,"deletions":5},"files":[{"sha":"4b12d219eac11792ce2fa632488104460397b7db","filename":"attendance/garden.py","status":"modified","additions":6,"deletions":3,"changes":9,"blob_url":"https://github.com/junho85/garden5/blob/7fc90ca7f2c923d90321523314ff877312113f64/attendance%2Fgarden.py","raw_url":"https://github.com/junho85/garden5/raw/7fc90ca7f2c923d90321523314ff877312113f64/attendance%2Fgarden.py","contents_url":"https://api.github.com/repos/junho85/garden5/contents/attendance%2Fgarden.py?ref=7fc90ca7f2c923d90321523314ff877312113f64","patch":"@@ -45,6 +45,11 @@ def __init__(self):\n     def connect_mongo(self):\n         return pymongo.MongoClient(\"mongodb://%s:%s\" % (self.mongo_host, self.mongo_port))\n \n+    def get_database(self):\n+        conn = self.connect_mongo()\n+\n+        return conn.get_database(self.mongo_database)\n+\n     def get_member(self):\n         return self.users\n \n@@ -156,9 +161,7 @@ def collect_slack_messages(self, oldest, latest):\n     def remove_all_slack_messages(self):\n         conn = self.connect_mongo()\n \n-        mongo_database = self.mongo_database\n-\n-        db = conn.get_database(mongo_database)\n+        db = conn.get_database(self.mongo_database)\n \n         mongo_collection = db.get_collection(self.mongo_collection_slack_message)\n         mongo_collection.remove()"},{"sha":"1bc51723bf3099f38c7c3c162d132582363e7d5f","filename":"docs/01.mongodb.md","status":"modified","additions":1,"deletions":2,"changes":3,"blob_url":"https://github.com/junho85/garden5/blob/7fc90ca7f2c923d90321523314ff877312113f64/docs%2F01.mongodb.md","raw_url":"https://github.com/junho85/garden5/raw/7fc90ca7f2c923d90321523314ff877312113f64/docs%2F01.mongodb.md","contents_url":"https://api.github.com/repos/junho85/garden5/contents/docs%2F01.mongodb.md?ref=7fc90ca7f2c923d90321523314ff877312113f64","patch":"@@ -38,8 +38,7 @@ docker 에 직접 들어가서 뭔가 하고 싶은 경우 사용합니다.\n docker exec -it mymongo /bin/bash\n ```\n \n-\n-이건 전에 왜 적어 놨지...\n+## docker 데몬 start/stop\n ```\n sudo systemctl start docker\n sudo systemctl stop docker"}]}