Skip to content

Commit

Permalink
fix: replay or delete in gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolife999 committed Dec 9, 2024
1 parent 33ff4e9 commit 17033c4
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import fr.insee.arc.core.factory.ApiServiceFactory;
import fr.insee.arc.core.model.TraitementEtat;
import fr.insee.arc.core.model.TraitementPhase;
import fr.insee.arc.core.service.global.bo.Sandbox;
import fr.insee.arc.core.service.global.dao.PhaseOperations;
import fr.insee.arc.core.service.p0initialisation.useroperation.ReplayOrDeleteFilesOperation;
import fr.insee.arc.core.service.s3.ArcS3;
import fr.insee.arc.utils.database.Delimiters;
import fr.insee.arc.utils.exception.ArcException;
Expand Down Expand Up @@ -137,9 +139,6 @@ private String restore(Model model, String code, String messageOk) {
if (!isEnvProd()) {
// Lancement de l'initialisation dans la foulée
loggerDispatcher.info("Synchronisation de l'environnement ", LOGGER);
ApiServiceFactory
.getService(TraitementPhase.INITIALISATION, getBacASable(), TraitementPhase.INITIALISATION.getNbLigneATraiter(), null)
.invokeApi();
ApiServiceFactory
.getService(TraitementPhase.RECEPTION, getBacASable(), TraitementPhase.RECEPTION.getNbLigneATraiter(), null)
.invokeApi();
Expand Down Expand Up @@ -207,9 +206,13 @@ public String toDeleteBAS(Model model) {
// production
if (!isEnvProd()) {
loggerDispatcher.info("Synchronisation de l'environnement ", LOGGER);
ApiServiceFactory
.getService(TraitementPhase.INITIALISATION, getBacASable(), TraitementPhase.INITIALISATION.getNbLigneATraiter(), null)
.invokeApi();
Sandbox sandbox = new Sandbox(null, getBacASable());
try {
new ReplayOrDeleteFilesOperation(sandbox).processMarkedFiles();
} catch (ArcException e) {
loggerDispatcher.error("Error in PilotageBASAction.toDeleteBAS", LOGGER);
message = "managementSandbox.batch.delete.error";
}
}

this.views.getViewPilotageBAS().setMessage(message);
Expand Down

0 comments on commit 17033c4

Please sign in to comment.