Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
924501bf
Commit
924501bf
authored
Nov 21, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use logger for serveJobsAPI
parent
b6d34e83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Jobs.hs
src/Gargantext/Utils/Jobs.hs
+5
-2
No files found.
src/Gargantext/Utils/Jobs.hs
View file @
924501bf
...
...
@@ -50,13 +50,16 @@ serveJobsAPI
,
MonadJobStatus
m
,
m
~
(
GargM
Env
BackendInternalError
)
,
JobEventType
m
~
JobOutputType
m
,
MonadLogger
m
)
=>
JobType
m
->
(
JobHandle
m
->
input
->
m
()
)
->
SJ
.
AsyncJobsServerT'
ctI
ctO
callbacks
(
JobEventType
m
)
input
(
JobOutputType
m
)
m
serveJobsAPI
jobType
f
=
Internal
.
serveJobsAPI
mkJobHandle
ask
jobType
jobErrorToGargError
$
\
env
jHandle
i
->
do
putStrLn
(
"Running job of type: "
++
show
jobType
)
runExceptT
$
runReaderT
(
f
jHandle
i
>>
getLatestJobStatus
jHandle
)
env
runExceptT
$
flip
runReaderT
env
$
do
$
(
logLocM
)
INFO
(
T
.
pack
$
"Running job of type: "
++
show
jobType
)
f
jHandle
i
getLatestJobStatus
jHandle
parseGargJob
::
String
->
Maybe
GargJob
parseGargJob
s
=
case
s
of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment