{"action":"opened","issue":{"url":"https://api.github.com/repos/42minutes/42minutes-server-api/issues/5","labels_url":"https://api.github.com/repos/42minutes/42minutes-server-api/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/42minutes/42minutes-server-api/issues/5/comments","events_url":"https://api.github.com/repos/42minutes/42minutes-server-api/issues/5/events","html_url":"https://github.com/42minutes/42minutes-server-api/issues/5","id":54430833,"number":5,"title":"Queuing for background tasks","user":{"login":"geoah","id":88447,"avatar_url":"https://avatars.githubusercontent.com/u/88447?v=3","gravatar_id":"","url":"https://api.github.com/users/geoah","html_url":"https://github.com/geoah","followers_url":"https://api.github.com/users/geoah/followers","following_url":"https://api.github.com/users/geoah/following{/other_user}","gists_url":"https://api.github.com/users/geoah/gists{/gist_id}","starred_url":"https://api.github.com/users/geoah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoah/subscriptions","organizations_url":"https://api.github.com/users/geoah/orgs","repos_url":"https://api.github.com/users/geoah/repos","events_url":"https://api.github.com/users/geoah/events{/privacy}","received_events_url":"https://api.github.com/users/geoah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/42minutes/42minutes-server-api/labels/feature","name":"feature","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"superdecimal","id":5281398,"avatar_url":"https://avatars.githubusercontent.com/u/5281398?v=3","gravatar_id":"","url":"https://api.github.com/users/superdecimal","html_url":"https://github.com/superdecimal","followers_url":"https://api.github.com/users/superdecimal/followers","following_url":"https://api.github.com/users/superdecimal/following{/other_user}","gists_url":"https://api.github.com/users/superdecimal/gists{/gist_id}","starred_url":"https://api.github.com/users/superdecimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdecimal/subscriptions","organizations_url":"https://api.github.com/users/superdecimal/orgs","repos_url":"https://api.github.com/users/superdecimal/repos","events_url":"https://api.github.com/users/superdecimal/events{/privacy}","received_events_url":"https://api.github.com/users/superdecimal/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-01-15T09:59:25Z","updated_at":"2015-01-15T09:59:25Z","closed_at":null,"body":"There is the need to at least background processes.\r\n1) Process UserFiles\r\n2) Lookup Infohashes for Episodes\r\n3) Sync Shows/Seasons/Episodes with TVDB/Trakt\r\n\r\nCreate a queuing mechanism to allow to adding tasks to for processing UserFiles to a collector specific for this task.\r\nA very interesting reading is [Worker queues in Go](http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html)\r\n\r\nOn app start the queue should be filled with the unprocessed UserFiles from the database.\r\nNew UserFiles should be pushed into the queue upon arrival."}}