{"action":"created","issue":{"url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/86","labels_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/86/comments","events_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/86/events","html_url":"https://github.com/vsivsi/meteor-job-collection/issues/86","id":88776765,"number":86,"title":"Fixing \"running\" jobs that aren't running","user":{"login":"aldeed","id":3012067,"avatar_url":"https://avatars.githubusercontent.com/u/3012067?v=3","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vsivsi/meteor-job-collection/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-16T16:33:48Z","updated_at":"2015-06-16T20:37:20Z","closed_at":null,"body":"I'm using this and it's working well, but sometimes jobs get stuck at \"running\" state. I think it happens when a worker process is killed while working on it.\r\n\r\nIs there (or could there be) a way to say \"Workers should never take more than N time to do this task. If it's still running after that time, try to auto fix/restart.\"?"},"comment":{"url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/comments/112561602","html_url":"https://github.com/vsivsi/meteor-job-collection/issues/86#issuecomment-112561602","issue_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/86","id":112561602,"user":{"login":"aldeed","id":3012067,"avatar_url":"https://avatars.githubusercontent.com/u/3012067?v=3","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T20:37:20Z","updated_at":"2015-06-16T20:37:20Z","body":"That makes some sense.\r\n\r\nI'm building an events/notifications package on top of this (will eventually be published), and in that case, it would be nice if I could simply pass through an optional timeout (and cleanup) value when they define a notifier (which correlates with getWork/processJobs).\r\n\r\nIt's true that I can implement that separately using your example, but since it feels like a common need, I thought it might be better built in.\r\n\r\nAlso your comment about it being more efficient when using the existing promotion polling kind of makes a good case for why it should NOT be done outside of the package.\r\n\r\nI agree nothing should happen automatically, but if we pass an option that causes it to happen only for that type, that seems pretty safe."}}