-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
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
main = do
hworker <- create "notifier" (State state)
forkIO (worker hworker)
forkIO (monitor hworker)
forever $ queue hworker (ServiceAction "test" "testing" 1) >> threadDelay 5000000
This 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.
This is the Job instance
instance Job State ServiceJob where
job (State mvar) (ServiceAction service action id) = do
clients <- takeMVar mvar
let message = "service:"
++ (service)
++ "|action:"
++ (action)
++ "|id:"
++ show id
print message >> return Success
--broadcast (T.pack message) clients
-- return Success
job (State mvar) (SearchIndex service id) = do
putStrLn "search"
return Success
Metadata
Metadata
Assignees
Labels
No labels