gargantext-0.0.7.1.5.3: Search, map, share
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gargantext.Utils.Jobs.Internal

Synopsis

Documentation

serveJobsAPI :: (Ord t, MonadError BackendInternalError m, MonadJob m t (Seq event) output, ToJSON event, ToJSON output, MimeRender JSON output, Foldable callback) => (JobID 'Safe -> LoggerM m event -> JobHandle m) -> m env -> t -> (JobError -> BackendInternalError) -> (env -> JobHandle m -> input -> IO (Either BackendInternalError output)) -> AsyncJobsServerT' ctI ctO callback event input output m #

Internals for testing

newJob :: (Ord t, MonadJob m t (Seq event) output, ToJSON event, ToJSON output, MimeRender JSON output, Foldable callbacks) => (JobID 'Safe -> LoggerM m event -> JobHandle m) -> m env -> t -> (env -> JobHandle m -> input -> IO (Either BackendInternalError output)) -> JobInput callbacks input -> m (JobStatus 'Safe event) #