{"action":"created","issue":{"url":"https://api.github.com/repos/lykmapipo/sails-hook-subscriber/issues/2","labels_url":"https://api.github.com/repos/lykmapipo/sails-hook-subscriber/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/lykmapipo/sails-hook-subscriber/issues/2/comments","events_url":"https://api.github.com/repos/lykmapipo/sails-hook-subscriber/issues/2/events","html_url":"https://github.com/lykmapipo/sails-hook-subscriber/issues/2","id":73965822,"number":2,"title":"jobs get stuck in inactive/failed state","user":{"login":"codefullon","id":7733925,"avatar_url":"https://avatars.githubusercontent.com/u/7733925?v=3","gravatar_id":"","url":"https://api.github.com/users/codefullon","html_url":"https://github.com/codefullon","followers_url":"https://api.github.com/users/codefullon/followers","following_url":"https://api.github.com/users/codefullon/following{/other_user}","gists_url":"https://api.github.com/users/codefullon/gists{/gist_id}","starred_url":"https://api.github.com/users/codefullon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefullon/subscriptions","organizations_url":"https://api.github.com/users/codefullon/orgs","repos_url":"https://api.github.com/users/codefullon/repos","events_url":"https://api.github.com/users/codefullon/events{/privacy}","received_events_url":"https://api.github.com/users/codefullon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-07T12:20:12Z","updated_at":"2015-05-07T12:36:27Z","closed_at":null,"body":"I have a worker that extracts links from a web page- not sure why but this particular worker (unlike 4 which are working fine) either\r\na) gets stuck in inactive state\r\nb) fail\r\none of the things is that this does not always happen which each of the jobs this worker finishes, so that's where the confusion is\r\n\r\nHere's the code for the above mentioned worker: http://pastebin.com/xGhPcBt9\r\n\r\nWhat i want to learn is:\r\na) how do i debug what's going wrong\r\nb) what can i do to restart the job it fails - would use .attempt(x) be the best option?\r\nc) how do i get the jobs to force continue if it gets stuck in inactive mode and nothing is really happening, atm what i have to do is restart the sails server after which the inactive jobs start processing but after some gets done, again the queue gets hanged\r\n\r\nthanks :D"},"comment":{"url":"https://api.github.com/repos/lykmapipo/sails-hook-subscriber/issues/comments/99848495","html_url":"https://github.com/lykmapipo/sails-hook-subscriber/issues/2#issuecomment-99848495","issue_url":"https://api.github.com/repos/lykmapipo/sails-hook-subscriber/issues/2","id":99848495,"user":{"login":"codefullon","id":7733925,"avatar_url":"https://avatars.githubusercontent.com/u/7733925?v=3","gravatar_id":"","url":"https://api.github.com/users/codefullon","html_url":"https://github.com/codefullon","followers_url":"https://api.github.com/users/codefullon/followers","following_url":"https://api.github.com/users/codefullon/following{/other_user}","gists_url":"https://api.github.com/users/codefullon/gists{/gist_id}","starred_url":"https://api.github.com/users/codefullon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefullon/subscriptions","organizations_url":"https://api.github.com/users/codefullon/orgs","repos_url":"https://api.github.com/users/codefullon/repos","events_url":"https://api.github.com/users/codefullon/events{/privacy}","received_events_url":"https://api.github.com/users/codefullon/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T12:36:27Z","updated_at":"2015-05-07T12:36:27Z","body":"hi @lykmapipo , the name of the worker file is 'LinksExtractWorker.js'\r\n\r\nand below is the publisher code i use to save the job:\r\n\r\n var linksExtractJob = publisher.create('linksextract', {\r\n            title: \"grabbing links from the following url: \" + urlPath,\r\n            url: urlPath,\r\n            urlId: urlId\r\n}).save();"}}