Skip to content

Commit

Permalink
More logging #823
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Mar 20, 2024
1 parent 31eca2e commit 0bef0b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions grails-app/services/au/org/ala/ecodata/ParatooService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,19 @@ class ParatooService {

String url = paratooBaseUrl+'/'+apiEndpoint
String query = buildSurveyQueryString(start, limit)
log.debug("Retrieving survey data from: "+url+query)
Map response = webService.getJson(url+query, null, authHeader, false)
log.debug(response)
Map survey = findMatchingSurvey(surveyId, response.data, config)

int total = response.meta?.pagination?.total ?: 0
while (!survey && start+limit < total) {
start += limit

query = buildSurveyQueryString(start, limit)
log.debug("Retrieving survey data from: "+url+query)
response = webService.getJson(url+query, null, authHeader, false)
log.debug(response)
survey = findMatchingSurvey(surveyId, response.data, config)
}

Expand Down

0 comments on commit 0bef0b6

Please sign in to comment.