Skip to content

add two reprocess endpoints#425

Open
Hajarel-moukh wants to merge 5 commits intomainfrom
devReprocessRawDatas
Open

add two reprocess endpoints#425
Hajarel-moukh wants to merge 5 commits intomainfrom
devReprocessRawDatas

Conversation

@Hajarel-moukh
Copy link
Contributor

No description provided.

Copy link

@nsenave nsenave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quelques commentaires

: ResponseEntity.ok(NB_DOCS_WITH_FORMATTED
.formatted(result.dataCount(), result.formattedDataCount(), collectionInstrumentId));
} catch (GenesisException e) {
return ResponseEntity.status(e.getStatus()).body(e.getMessage());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce qu'on gèrerait pas plutôt via un ExceptionHandler ?

: ResponseEntity.ok("%d document(s) processed, including %d FORMATTED after data verification"
.formatted(result.dataCount(), result.formattedDataCount()));
} catch (GenesisException e) {
return ResponseEntity.status(e.getStatus()).body(e.getMessage());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(même question)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça serait bien de définir des private static final String ... (constante ou fonction) pour faire plaisir à Sonar sur les string dupliquées

}

@Override
public void resetProcessDatesByQuestionnaireId(String questionnaireId) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

un commentaire du style // do nothing (stub) pour faire plaisir à sonar ?


@Override
public void resetProcessDatesByCollectionInstrumentId(String collectionInstrumentId) {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(même commentaire pour l'issue sonar)

try{
return rawData.data().get("validationDate") == null ? null :
LocalDateTime.parse(rawData.data().get("validationDate").toString());
LocalDateTime.parse(rawData.data().get("validationDate").toString(), DateTimeFormatter.ISO_OFFSET_DATE_TIME);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants