Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
crawlers
hal
Commits
2fc23339
Commit
2fc23339
authored
Feb 24, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[conduit] some fixes to the fetch function name
parent
aa1b7e0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
HAL.hs
src/HAL.hs
+2
-3
No files found.
src/HAL.hs
View file @
2fc23339
...
...
@@ -26,8 +26,8 @@ getMetadataWith q start rows = do
manager'
<-
newManager
tlsManagerSettings
runHalAPIClient
$
search
(
Just
requestedFields
)
[
q
]
Nothing
start
rows
getMetadata
Recursively
::
Text
->
Maybe
Int
->
Maybe
Integer
->
IO
(
Either
ClientError
(
Maybe
Integer
,
ConduitT
()
Corpus
IO
()
))
getMetadata
Recursively
q
start
rows
=
do
getMetadata
WithC
::
Text
->
Maybe
Int
->
Maybe
Integer
->
IO
(
Either
ClientError
(
Maybe
Integer
,
ConduitT
()
Corpus
IO
()
))
getMetadata
WithC
q
start
rows
=
do
manager'
<-
newManager
tlsManagerSettings
-- First, estimate the total number of documents
eRes
<-
runHalAPIClient
$
search
(
Just
requestedFields
)
[
q
]
Nothing
(
Just
0
)
(
Just
1
)
...
...
@@ -48,7 +48,6 @@ getMetadataRecursively q start rows = do
getPage
::
Text
->
Int
->
Int
->
IO
[
Corpus
]
getPage
q
start
pageNum
=
do
let
offset
=
start
+
pageNum
*
batchSize
print
$
show
offset
eRes
<-
runHalAPIClient
$
search
(
Just
requestedFields
)
[
q
]
Nothing
(
Just
offset
)
(
Just
$
fromIntegral
batchSize
)
pure
$
case
eRes
of
Left
_
->
[]
...
...
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