Unfortunately the package hgearman does not provide any test or example and I can't work it out for myself how should be combined connectGearman
and submitJob
to put a job to the gearman job server.
The result of connectGearman
is:
ghci> conn <- connectGearman (B.pack "x") ("localhost"::HostName) (4730::Port)
ghci> :t conn
conn :: Either GearmanError GearmanClient
but submitJob
uses private function submit
which deals with StateT
. So I can only guess the result of connectGearman
should be wrapped into S.StateT GearmanClient IO
without faintest idea how to do that.