{"action":"created","issue":{"url":"https://api.github.com/repos/blafri/blocitoff/issues/8","labels_url":"https://api.github.com/repos/blafri/blocitoff/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/blafri/blocitoff/issues/8/comments","events_url":"https://api.github.com/repos/blafri/blocitoff/issues/8/events","html_url":"https://github.com/blafri/blocitoff/pull/8","id":73616854,"number":8,"title":"Delete expired items","user":{"login":"blafri","id":10417068,"avatar_url":"https://avatars.githubusercontent.com/u/10417068?v=3","gravatar_id":"","url":"https://api.github.com/users/blafri","html_url":"https://github.com/blafri","followers_url":"https://api.github.com/users/blafri/followers","following_url":"https://api.github.com/users/blafri/following{/other_user}","gists_url":"https://api.github.com/users/blafri/gists{/gist_id}","starred_url":"https://api.github.com/users/blafri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blafri/subscriptions","organizations_url":"https://api.github.com/users/blafri/orgs","repos_url":"https://api.github.com/users/blafri/repos","events_url":"https://api.github.com/users/blafri/events{/privacy}","received_events_url":"https://api.github.com/users/blafri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-06T13:17:45Z","updated_at":"2015-05-15T00:58:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/blafri/blocitoff/pulls/8","html_url":"https://github.com/blafri/blocitoff/pull/8","diff_url":"https://github.com/blafri/blocitoff/pull/8.diff","patch_url":"https://github.com/blafri/blocitoff/pull/8.patch"},"body":"Hey Felix,\r\nI setup the rake task to delete the expired items.\r\nTake a look and let me know how it looks. \r\nI was having some trouble with regards to users time zones, and deleting the users tasks a couple of hours early because all times in the database are in UTC. I didn't want to load all the objects from the database and use ruby to convert the time zones and see which ones need to be deleted, so I added a database field called expires_at and when the record is created it sets the expired at to the time it needs to expire in UTC. Then I set the task to run every hour to check if anything needs to be cleaned up.\r\n\r\nLet me know if there was a better way to accomplish this.\r\n\r\nThanks,\r\nBlayne"},"comment":{"url":"https://api.github.com/repos/blafri/blocitoff/issues/comments/102213572","html_url":"https://github.com/blafri/blocitoff/pull/8#issuecomment-102213572","issue_url":"https://api.github.com/repos/blafri/blocitoff/issues/8","id":102213572,"user":{"login":"felixclack","id":3126,"avatar_url":"https://avatars.githubusercontent.com/u/3126?v=3","gravatar_id":"","url":"https://api.github.com/users/felixclack","html_url":"https://github.com/felixclack","followers_url":"https://api.github.com/users/felixclack/followers","following_url":"https://api.github.com/users/felixclack/following{/other_user}","gists_url":"https://api.github.com/users/felixclack/gists{/gist_id}","starred_url":"https://api.github.com/users/felixclack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixclack/subscriptions","organizations_url":"https://api.github.com/users/felixclack/orgs","repos_url":"https://api.github.com/users/felixclack/repos","events_url":"https://api.github.com/users/felixclack/events{/privacy}","received_events_url":"https://api.github.com/users/felixclack/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T00:58:15Z","updated_at":"2015-05-15T00:58:15Z","body":":+1:"}}