{"action":"created","issue":{"url":"https://api.github.com/repos/positiondev/hworker/issues/4","repository_url":"https://api.github.com/repos/positiondev/hworker","labels_url":"https://api.github.com/repos/positiondev/hworker/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/positiondev/hworker/issues/4/comments","events_url":"https://api.github.com/repos/positiondev/hworker/issues/4/events","html_url":"https://github.com/positiondev/hworker/issues/4","id":281742668,"number":4,"title":"Job only running one time","user":{"login":"naglalakk","id":1476867,"avatar_url":"https://avatars1.githubusercontent.com/u/1476867?v=4","gravatar_id":"","url":"https://api.github.com/users/naglalakk","html_url":"https://github.com/naglalakk","followers_url":"https://api.github.com/users/naglalakk/followers","following_url":"https://api.github.com/users/naglalakk/following{/other_user}","gists_url":"https://api.github.com/users/naglalakk/gists{/gist_id}","starred_url":"https://api.github.com/users/naglalakk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naglalakk/subscriptions","organizations_url":"https://api.github.com/users/naglalakk/orgs","repos_url":"https://api.github.com/users/naglalakk/repos","events_url":"https://api.github.com/users/naglalakk/events{/privacy}","received_events_url":"https://api.github.com/users/naglalakk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-13T13:05:29Z","updated_at":"2017-12-13T14:39:43Z","closed_at":null,"author_association":"NONE","body":"I'm wondering why my queue is not getting processed. When I run this code a single job is processed but then if I add debugging I see that the queue is just filling up. My code\r\n\r\n```\r\nmain = do\r\n\thworker <- create \"notifier\" (State state)\r\n\tforkIO (worker hworker)\r\n\tforkIO (monitor hworker)\r\n\tforever $ queue hworker (ServiceAction \"test\" \"testing\" 1) >> threadDelay 5000000\r\n```\r\n\r\nThis should push a new job into the queue every 5 seconds, which it does. But it's not processing it. I checked the failed jobs queue and it's completely empty so they are not failing.\r\n\r\nThis is the Job instance\r\n```\r\ninstance Job State ServiceJob where\r\n\tjob (State mvar) (ServiceAction service action id) = do \r\n\t\tclients <- takeMVar mvar\r\n\t\tlet message = \"service:\" \r\n\t\t\t\t   ++ (service) \r\n\t\t\t\t   ++ \"|action:\" \r\n\t\t\t\t   ++ (action) \r\n\t\t\t\t   ++ \"|id:\" \r\n\t\t\t\t   ++ show id\r\n\t\tprint message >> return Success\r\n\t\t--broadcast (T.pack message) clients\r\n\t\t-- return Success\r\n\tjob (State mvar) (SearchIndex service id) = do\r\n\t\tputStrLn \"search\"\r\n\t\treturn Success\r\n```"},"comment":{"url":"https://api.github.com/repos/positiondev/hworker/issues/comments/351409927","html_url":"https://github.com/positiondev/hworker/issues/4#issuecomment-351409927","issue_url":"https://api.github.com/repos/positiondev/hworker/issues/4","id":351409927,"user":{"login":"naglalakk","id":1476867,"avatar_url":"https://avatars1.githubusercontent.com/u/1476867?v=4","gravatar_id":"","url":"https://api.github.com/users/naglalakk","html_url":"https://github.com/naglalakk","followers_url":"https://api.github.com/users/naglalakk/followers","following_url":"https://api.github.com/users/naglalakk/following{/other_user}","gists_url":"https://api.github.com/users/naglalakk/gists{/gist_id}","starred_url":"https://api.github.com/users/naglalakk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naglalakk/subscriptions","organizations_url":"https://api.github.com/users/naglalakk/orgs","repos_url":"https://api.github.com/users/naglalakk/repos","events_url":"https://api.github.com/users/naglalakk/events{/privacy}","received_events_url":"https://api.github.com/users/naglalakk/received_events","type":"User","site_admin":false},"created_at":"2017-12-13T14:39:43Z","updated_at":"2017-12-13T14:39:43Z","author_association":"NONE","body":"Does \"A reliable at-least-once job queue built on Redis.\" mean that it can only run one queue per redis database? "}}
{"actor":{"display_login":"naglalakk"}}