{"action":"created","comment":{"url":"https://api.github.com/repos/slugiot/slugiot-client/pulls/comments/60306102","id":60306102,"diff_hunk":"@@ -6,18 +6,44 @@ class ProcedureApi():\n     def __init__(self, procedure_name):\n         self.procedure_name = procedure_name\n \n-    def write_value(self, name, data):\n-        pass\n+    def write_value(self, dictionary):\n+        \"\"\" Writes key value pairs into the values table\n+        param dictionary: Takes dictionary of key/value pairs as input\n+        \"\"\"\n+        db = current.db\n+        for key in dictionary.keys():\n+            val = dictionary[key]\n+            # Update the key value for this module if it already exists\n+            db.module_values.update_or_insert((db.module_values.name == key) & (db.module_values.modulename == self.procedure_name),\n+                                              time_stamp=datetime.datetime.utcnow(),\n+                                              modulename=self.procedure_name,","path":"applications/client/modules/procedureapi.py","position":16,"original_position":16,"commit_id":"0573ccf9cb9c66289ba8dd7e0eccb8cc289d34b3","original_commit_id":"0573ccf9cb9c66289ba8dd7e0eccb8cc289d34b3","user":{"login":"rakshit-agrawal","id":4129660,"avatar_url":"https://avatars.githubusercontent.com/u/4129660?v=3","gravatar_id":"","url":"https://api.github.com/users/rakshit-agrawal","html_url":"https://github.com/rakshit-agrawal","followers_url":"https://api.github.com/users/rakshit-agrawal/followers","following_url":"https://api.github.com/users/rakshit-agrawal/following{/other_user}","gists_url":"https://api.github.com/users/rakshit-agrawal/gists{/gist_id}","starred_url":"https://api.github.com/users/rakshit-agrawal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakshit-agrawal/subscriptions","organizations_url":"https://api.github.com/users/rakshit-agrawal/orgs","repos_url":"https://api.github.com/users/rakshit-agrawal/repos","events_url":"https://api.github.com/users/rakshit-agrawal/events{/privacy}","received_events_url":"https://api.github.com/users/rakshit-agrawal/received_events","type":"User","site_admin":false},"body":"time_stamp might change in the DB table after merge with synchronization branch. It's good for now, but do remember to modify the field names once their branch is merged.","created_at":"2016-04-19T20:35:39Z","updated_at":"2016-04-19T20:35:39Z","html_url":"https://github.com/slugiot/slugiot-client/pull/4#discussion_r60306102","pull_request_url":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/slugiot/slugiot-client/pulls/comments/60306102"},"html":{"href":"https://github.com/slugiot/slugiot-client/pull/4#discussion_r60306102"},"pull_request":{"href":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4","id":67082607,"html_url":"https://github.com/slugiot/slugiot-client/pull/4","diff_url":"https://github.com/slugiot/slugiot-client/pull/4.diff","patch_url":"https://github.com/slugiot/slugiot-client/pull/4.patch","issue_url":"https://api.github.com/repos/slugiot/slugiot-client/issues/4","number":4,"state":"open","locked":false,"title":"Procedure api code","user":{"login":"kmohanku","id":18337874,"avatar_url":"https://avatars.githubusercontent.com/u/18337874?v=3","gravatar_id":"","url":"https://api.github.com/users/kmohanku","html_url":"https://github.com/kmohanku","followers_url":"https://api.github.com/users/kmohanku/followers","following_url":"https://api.github.com/users/kmohanku/following{/other_user}","gists_url":"https://api.github.com/users/kmohanku/gists{/gist_id}","starred_url":"https://api.github.com/users/kmohanku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmohanku/subscriptions","organizations_url":"https://api.github.com/users/kmohanku/orgs","repos_url":"https://api.github.com/users/kmohanku/repos","events_url":"https://api.github.com/users/kmohanku/events{/privacy}","received_events_url":"https://api.github.com/users/kmohanku/received_events","type":"User","site_admin":false},"body":"We have added the functions for writing into outputs, values and logs tables. We have tested these functions and they work fine. We still need to sync up with visualization team and figure out the Json format for the text. We have also added a method for scheduling and are investigating it.","created_at":"2016-04-19T20:18:33Z","updated_at":"2016-04-19T20:35:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eaa62f0b7a304b770702a94df44b4c5a93cf261e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4/commits","review_comments_url":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4/comments","review_comment_url":"https://api.github.com/repos/slugiot/slugiot-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slugiot/slugiot-client/issues/4/comments","statuses_url":"https://api.github.com/repos/slugiot/slugiot-client/statuses/0573ccf9cb9c66289ba8dd7e0eccb8cc289d34b3","head":{"label":"slugiot:procedure_api","ref":"procedure_api","sha":"0573ccf9cb9c66289ba8dd7e0eccb8cc289d34b3","user":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"repo":{"id":56093893,"name":"slugiot-client","full_name":"slugiot/slugiot-client","owner":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slugiot/slugiot-client","description":"","fork":false,"url":"https://api.github.com/repos/slugiot/slugiot-client","forks_url":"https://api.github.com/repos/slugiot/slugiot-client/forks","keys_url":"https://api.github.com/repos/slugiot/slugiot-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slugiot/slugiot-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slugiot/slugiot-client/teams","hooks_url":"https://api.github.com/repos/slugiot/slugiot-client/hooks","issue_events_url":"https://api.github.com/repos/slugiot/slugiot-client/issues/events{/number}","events_url":"https://api.github.com/repos/slugiot/slugiot-client/events","assignees_url":"https://api.github.com/repos/slugiot/slugiot-client/assignees{/user}","branches_url":"https://api.github.com/repos/slugiot/slugiot-client/branches{/branch}","tags_url":"https://api.github.com/repos/slugiot/slugiot-client/tags","blobs_url":"https://api.github.com/repos/slugiot/slugiot-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slugiot/slugiot-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slugiot/slugiot-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/slugiot/slugiot-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slugiot/slugiot-client/statuses/{sha}","languages_url":"https://api.github.com/repos/slugiot/slugiot-client/languages","stargazers_url":"https://api.github.com/repos/slugiot/slugiot-client/stargazers","contributors_url":"https://api.github.com/repos/slugiot/slugiot-client/contributors","subscribers_url":"https://api.github.com/repos/slugiot/slugiot-client/subscribers","subscription_url":"https://api.github.com/repos/slugiot/slugiot-client/subscription","commits_url":"https://api.github.com/repos/slugiot/slugiot-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/slugiot/slugiot-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/slugiot/slugiot-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/slugiot/slugiot-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/slugiot/slugiot-client/contents/{+path}","compare_url":"https://api.github.com/repos/slugiot/slugiot-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slugiot/slugiot-client/merges","archive_url":"https://api.github.com/repos/slugiot/slugiot-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slugiot/slugiot-client/downloads","issues_url":"https://api.github.com/repos/slugiot/slugiot-client/issues{/number}","pulls_url":"https://api.github.com/repos/slugiot/slugiot-client/pulls{/number}","milestones_url":"https://api.github.com/repos/slugiot/slugiot-client/milestones{/number}","notifications_url":"https://api.github.com/repos/slugiot/slugiot-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slugiot/slugiot-client/labels{/name}","releases_url":"https://api.github.com/repos/slugiot/slugiot-client/releases{/id}","deployments_url":"https://api.github.com/repos/slugiot/slugiot-client/deployments","created_at":"2016-04-12T20:03:27Z","updated_at":"2016-04-12T20:06:18Z","pushed_at":"2016-04-19T20:18:33Z","git_url":"git://github.com/slugiot/slugiot-client.git","ssh_url":"git@github.com:slugiot/slugiot-client.git","clone_url":"https://github.com/slugiot/slugiot-client.git","svn_url":"https://github.com/slugiot/slugiot-client","homepage":null,"size":34374,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master_slugiot"}},"base":{"label":"slugiot:master_slugiot","ref":"master_slugiot","sha":"344aa639277a13c362b3dd605db340846c4a351c","user":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"repo":{"id":56093893,"name":"slugiot-client","full_name":"slugiot/slugiot-client","owner":{"login":"slugiot","id":18412481,"avatar_url":"https://avatars.githubusercontent.com/u/18412481?v=3","gravatar_id":"","url":"https://api.github.com/users/slugiot","html_url":"https://github.com/slugiot","followers_url":"https://api.github.com/users/slugiot/followers","following_url":"https://api.github.com/users/slugiot/following{/other_user}","gists_url":"https://api.github.com/users/slugiot/gists{/gist_id}","starred_url":"https://api.github.com/users/slugiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slugiot/subscriptions","organizations_url":"https://api.github.com/users/slugiot/orgs","repos_url":"https://api.github.com/users/slugiot/repos","events_url":"https://api.github.com/users/slugiot/events{/privacy}","received_events_url":"https://api.github.com/users/slugiot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slugiot/slugiot-client","description":"","fork":false,"url":"https://api.github.com/repos/slugiot/slugiot-client","forks_url":"https://api.github.com/repos/slugiot/slugiot-client/forks","keys_url":"https://api.github.com/repos/slugiot/slugiot-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slugiot/slugiot-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slugiot/slugiot-client/teams","hooks_url":"https://api.github.com/repos/slugiot/slugiot-client/hooks","issue_events_url":"https://api.github.com/repos/slugiot/slugiot-client/issues/events{/number}","events_url":"https://api.github.com/repos/slugiot/slugiot-client/events","assignees_url":"https://api.github.com/repos/slugiot/slugiot-client/assignees{/user}","branches_url":"https://api.github.com/repos/slugiot/slugiot-client/branches{/branch}","tags_url":"https://api.github.com/repos/slugiot/slugiot-client/tags","blobs_url":"https://api.github.com/repos/slugiot/slugiot-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slugiot/slugiot-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slugiot/slugiot-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/slugiot/slugiot-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slugiot/slugiot-client/statuses/{sha}","languages_url":"https://api.github.com/repos/slugiot/slugiot-client/languages","stargazers_url":"https://api.github.com/repos/slugiot/slugiot-client/stargazers","contributors_url":"https://api.github.com/repos/slugiot/slugiot-client/contributors","subscribers_url":"https://api.github.com/repos/slugiot/slugiot-client/subscribers","subscription_url":"https://api.github.com/repos/slugiot/slugiot-client/subscription","commits_url":"https://api.github.com/repos/slugiot/slugiot-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/slugiot/slugiot-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/slugiot/slugiot-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/slugiot/slugiot-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/slugiot/slugiot-client/contents/{+path}","compare_url":"https://api.github.com/repos/slugiot/slugiot-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slugiot/slugiot-client/merges","archive_url":"https://api.github.com/repos/slugiot/slugiot-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slugiot/slugiot-client/downloads","issues_url":"https://api.github.com/repos/slugiot/slugiot-client/issues{/number}","pulls_url":"https://api.github.com/repos/slugiot/slugiot-client/pulls{/number}","milestones_url":"https://api.github.com/repos/slugiot/slugiot-client/milestones{/number}","notifications_url":"https://api.github.com/repos/slugiot/slugiot-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slugiot/slugiot-client/labels{/name}","releases_url":"https://api.github.com/repos/slugiot/slugiot-client/releases{/id}","deployments_url":"https://api.github.com/repos/slugiot/slugiot-client/deployments","created_at":"2016-04-12T20:03:27Z","updated_at":"2016-04-12T20:06:18Z","pushed_at":"2016-04-19T20:18:33Z","git_url":"git://github.com/slugiot/slugiot-client.git","ssh_url":"git@github.com:slugiot/slugiot-client.git","clone_url":"https://github.com/slugiot/slugiot-client.git","svn_url":"https://github.com/slugiot/slugiot-client","homepage":null,"size":34374,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master_slugiot"}},"_links":{"self":{"href":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4"},"html":{"href":"https://github.com/slugiot/slugiot-client/pull/4"},"issue":{"href":"https://api.github.com/repos/slugiot/slugiot-client/issues/4"},"comments":{"href":"https://api.github.com/repos/slugiot/slugiot-client/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/slugiot/slugiot-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slugiot/slugiot-client/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/slugiot/slugiot-client/statuses/0573ccf9cb9c66289ba8dd7e0eccb8cc289d34b3"}}}}