{"action":"opened","issue":{"url":"https://api.github.com/repos/GetStream/stream-django/issues/32","labels_url":"https://api.github.com/repos/GetStream/stream-django/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/GetStream/stream-django/issues/32/comments","events_url":"https://api.github.com/repos/GetStream/stream-django/issues/32/events","html_url":"https://github.com/GetStream/stream-django/issues/32","id":121789315,"number":32,"title":"Recovering from a loss of data integrity / support for transactions ","user":{"login":"sampeka","id":7493006,"avatar_url":"https://avatars.githubusercontent.com/u/7493006?v=3","gravatar_id":"","url":"https://api.github.com/users/sampeka","html_url":"https://github.com/sampeka","followers_url":"https://api.github.com/users/sampeka/followers","following_url":"https://api.github.com/users/sampeka/following{/other_user}","gists_url":"https://api.github.com/users/sampeka/gists{/gist_id}","starred_url":"https://api.github.com/users/sampeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sampeka/subscriptions","organizations_url":"https://api.github.com/users/sampeka/orgs","repos_url":"https://api.github.com/users/sampeka/repos","events_url":"https://api.github.com/users/sampeka/events{/privacy}","received_events_url":"https://api.github.com/users/sampeka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-11T20:51:51Z","updated_at":"2015-12-11T20:51:51Z","closed_at":null,"body":"I'm running into some problems keeping data integrity between getstream and our database with transactions enabled, although the bigger problem is recovering from any loss of integrity. Problem is that at any point in the transaction the model could fail to save/delete and rollback, but the activity still remains in getstream. \r\n\r\nAt the moment I've had to settle on a hacky solution which just filters out any activity that fails to be linked to an object during the enriching process, but this feels a little bit inadequate. Ideally there would be a management command that I could run during maintenance to remove any deleted models from getstream, something like haystack's rebuild/update index commands, but looking at the api I'm not sure if that's possible.\r\n\r\nDo you have any general advice / is there a way to build in better support for transactions?"}}