{"action":"created","issue":{"url":"https://api.github.com/repos/dcobbley/capstone-e/issues/54","labels_url":"https://api.github.com/repos/dcobbley/capstone-e/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/dcobbley/capstone-e/issues/54/comments","events_url":"https://api.github.com/repos/dcobbley/capstone-e/issues/54/events","html_url":"https://github.com/dcobbley/capstone-e/issues/54","id":99340434,"number":54,"title":"Storage needs to re-populate on storage change","user":{"login":"thomasguerena","id":2658810,"avatar_url":"https://avatars.githubusercontent.com/u/2658810?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasguerena","html_url":"https://github.com/thomasguerena","followers_url":"https://api.github.com/users/thomasguerena/followers","following_url":"https://api.github.com/users/thomasguerena/following{/other_user}","gists_url":"https://api.github.com/users/thomasguerena/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasguerena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasguerena/subscriptions","organizations_url":"https://api.github.com/users/thomasguerena/orgs","repos_url":"https://api.github.com/users/thomasguerena/repos","events_url":"https://api.github.com/users/thomasguerena/events{/privacy}","received_events_url":"https://api.github.com/users/thomasguerena/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dcobbley/capstone-e/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/dcobbley/capstone-e/labels/in%20progress","name":"in progress","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"thomasguerena","id":2658810,"avatar_url":"https://avatars.githubusercontent.com/u/2658810?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasguerena","html_url":"https://github.com/thomasguerena","followers_url":"https://api.github.com/users/thomasguerena/followers","following_url":"https://api.github.com/users/thomasguerena/following{/other_user}","gists_url":"https://api.github.com/users/thomasguerena/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasguerena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasguerena/subscriptions","organizations_url":"https://api.github.com/users/thomasguerena/orgs","repos_url":"https://api.github.com/users/thomasguerena/repos","events_url":"https://api.github.com/users/thomasguerena/events{/privacy}","received_events_url":"https://api.github.com/users/thomasguerena/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-08-06T02:37:13Z","updated_at":"2015-08-07T00:35:50Z","closed_at":"2015-08-07T00:35:50Z","body":"Brute force it.\r\n\"this.store.onchange = this.populate\"\r\nThis should be set in the constructor after the initial populate is called.\r\nDo thorough testing and make sure things don't go horribly wrong when simultaneous populates run. You can check \"this.updating\" to see if a populate is currently in the works. Ideally, if \"updating\" was true, we would kill the existing populate and then start the new one. This is a necessary feature since \"onchange\" will get called per-file and it is likely one populate will get called while another is still finishing.\r\nSee Storage.fileExists() for an example of this situation."},"comment":{"url":"https://api.github.com/repos/dcobbley/capstone-e/issues/comments/128548701","html_url":"https://github.com/dcobbley/capstone-e/issues/54#issuecomment-128548701","issue_url":"https://api.github.com/repos/dcobbley/capstone-e/issues/54","id":128548701,"user":{"login":"thomasguerena","id":2658810,"avatar_url":"https://avatars.githubusercontent.com/u/2658810?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasguerena","html_url":"https://github.com/thomasguerena","followers_url":"https://api.github.com/users/thomasguerena/followers","following_url":"https://api.github.com/users/thomasguerena/following{/other_user}","gists_url":"https://api.github.com/users/thomasguerena/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasguerena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasguerena/subscriptions","organizations_url":"https://api.github.com/users/thomasguerena/orgs","repos_url":"https://api.github.com/users/thomasguerena/repos","events_url":"https://api.github.com/users/thomasguerena/events{/privacy}","received_events_url":"https://api.github.com/users/thomasguerena/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T00:35:50Z","updated_at":"2015-08-07T00:35:50Z","body":"I was going to add some code to handle simultaneous populates, but I've realized there's no issue with multiple populates working at the same time. It's less efficient, but it won't ruin any of our data. The simple \"onchange -> populate\" currently exists in a pending pull request. Unless testing proves otherwise, this feature is complete."}}