{"action":"created","issue":{"url":"https://api.github.com/repos/NSLS-II/dataportal/issues/69","labels_url":"https://api.github.com/repos/NSLS-II/dataportal/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/NSLS-II/dataportal/issues/69/comments","events_url":"https://api.github.com/repos/NSLS-II/dataportal/issues/69/events","html_url":"https://github.com/NSLS-II/dataportal/pull/69","id":58221221,"number":69,"title":"Updating a DataMuxer","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NSLS-II/dataportal/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/NSLS-II/dataportal/labels/needs_review","name":"needs_review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-19T15:17:24Z","updated_at":"2015-02-26T22:29:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NSLS-II/dataportal/pulls/69","html_url":"https://github.com/NSLS-II/dataportal/pull/69","diff_url":"https://github.com/NSLS-II/dataportal/pull/69.diff","patch_url":"https://github.com/NSLS-II/dataportal/pull/69.patch"},"body":"It works like this:\r\n\r\n```\r\nheader = DataBroker[-1]  # for example\r\nevents = DataBroker.fetch_events(header)\r\ndm = DataMuxer.from_events(events)\r\n\r\n# more Events are added to MDS...\r\n\r\nDataBroker.update(dm)\r\n```\r\n\r\nDataBroker is using only public attributes of `dm` to do its work. It's no problem if Events are added out of order. DataBroker dumps *all* the Events it finds in the DataMuxer, and DataMuxer takes care of identifying duplicates.\r\n\r\nI christened the method `DataBroker.update`. Or we could call it `DataBroker.refresh`. I like either one."},"comment":{"url":"https://api.github.com/repos/NSLS-II/dataportal/issues/comments/76288753","html_url":"https://github.com/NSLS-II/dataportal/pull/69#issuecomment-76288753","issue_url":"https://api.github.com/repos/NSLS-II/dataportal/issues/69","id":76288753,"user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T22:29:15Z","updated_at":"2015-02-26T22:29:15Z","body":"Rebased."}}