{"action":"created","issue":{"url":"https://api.github.com/repos/unepwcmc/SAPI/issues/543","repository_url":"https://api.github.com/repos/unepwcmc/SAPI","labels_url":"https://api.github.com/repos/unepwcmc/SAPI/issues/543/labels{/name}","comments_url":"https://api.github.com/repos/unepwcmc/SAPI/issues/543/comments","events_url":"https://api.github.com/repos/unepwcmc/SAPI/issues/543/events","html_url":"https://github.com/unepwcmc/SAPI/pull/543","id":135723561,"number":543,"title":"Add designation to documents","user":{"login":"agnessa","id":134055,"avatar_url":"https://avatars.githubusercontent.com/u/134055?v=3","gravatar_id":"","url":"https://api.github.com/users/agnessa","html_url":"https://github.com/agnessa","followers_url":"https://api.github.com/users/agnessa/followers","following_url":"https://api.github.com/users/agnessa/following{/other_user}","gists_url":"https://api.github.com/users/agnessa/gists{/gist_id}","starred_url":"https://api.github.com/users/agnessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agnessa/subscriptions","organizations_url":"https://api.github.com/users/agnessa/orgs","repos_url":"https://api.github.com/users/agnessa/repos","events_url":"https://api.github.com/users/agnessa/events{/privacy}","received_events_url":"https://api.github.com/users/agnessa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-23T12:25:07Z","updated_at":"2016-02-24T13:33:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/unepwcmc/SAPI/pulls/543","html_url":"https://github.com/unepwcmc/SAPI/pull/543","diff_url":"https://github.com/unepwcmc/SAPI/pull/543.diff","patch_url":"https://github.com/unepwcmc/SAPI/pull/543.patch"},"body":"https://www.pivotaltracker.com/story/show/79507392\r\n\r\nAdds designation to the document model, provides a way to update the value. There's also a rake task to populate default values where possible based on event type.\r\n\r\n`rake db:migrate`\r\n`rake elibrary:set_document_designation`\r\n`REFRESH MATERIALIZED VIEW api_documents_mview`"},"comment":{"url":"https://api.github.com/repos/unepwcmc/SAPI/issues/comments/188257085","html_url":"https://github.com/unepwcmc/SAPI/pull/543#issuecomment-188257085","issue_url":"https://api.github.com/repos/unepwcmc/SAPI/issues/543","id":188257085,"user":{"login":"agnessa","id":134055,"avatar_url":"https://avatars.githubusercontent.com/u/134055?v=3","gravatar_id":"","url":"https://api.github.com/users/agnessa","html_url":"https://github.com/agnessa","followers_url":"https://api.github.com/users/agnessa/followers","following_url":"https://api.github.com/users/agnessa/following{/other_user}","gists_url":"https://api.github.com/users/agnessa/gists{/gist_id}","starred_url":"https://api.github.com/users/agnessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agnessa/subscriptions","organizations_url":"https://api.github.com/users/agnessa/orgs","repos_url":"https://api.github.com/users/agnessa/repos","events_url":"https://api.github.com/users/agnessa/events{/privacy}","received_events_url":"https://api.github.com/users/agnessa/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T13:33:57Z","updated_at":"2016-02-24T13:33:57Z","body":"I also made a change to the sidekiq unique jobs gem configuration here (which for some reson upset travis a little). We previously had that gem to ensure only one RefreshDocumentsWorker is executing at a given time, to avoid locking up the database. But that did not prevent scheduling indefinite numbers of repetitions of the job, which I found problematic after I ran a large batch update recently to fix encoding on document titles. So I changed the uniqueness option to `until_and_while_executing`, which enforces uniqueness not only while executing, but also while scheduling (description of the different options here: https://github.com/mhenrixon/sidekiq-unique-jobs). But even after this change for individual updates I still see immediate execution of the refresh worker."}}