runJobs :: Pool -> IO ()
runJobs rpoo = report rpoo >> modifyMVar_ rpoo batch
 where
  batch jobs = M.differenceWith (\j b -> if b then Nothing else Just j) jobs <$> traverse runJob jobs
runJobs :: Pool -> IO ()
runJobs rpoo = report rpoo >> modifyMVar_ rpoo batch
 where
  batch jobs = M.differenceWith (\j b -> if b then Nothing else Just j) jobs <$> traverse runJob jobs
runJobs rpoo = report rpoo >> modifyMVar_ rpoo batch
 where
  batch jobs = M.differenceWith (\j b -> if b then Nothing else Just j) jobs <$> traverse runJob jobs