Skip to content

Commit

Permalink
deps(jobrunr): upgrade to 7.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrouillet committed Aug 1, 2024
1 parent f156d5c commit 69f25e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<usertype-core.version>7.0.0.CR1</usertype-core.version>
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
<pf4j-spring.version>0.9.0</pf4j-spring.version>
<jobrunr.version>5.3.3</jobrunr.version>
<jobrunr.version>7.2.2</jobrunr.version>
<pf4j.version>3.12.0</pf4j.version>
<git.user />
<git.password />
Expand Down Expand Up @@ -95,7 +95,7 @@
</dependency>
<dependency>
<groupId>org.jobrunr</groupId>
<artifactId>jobrunr-spring-boot-starter</artifactId>
<artifactId>jobrunr-spring-boot-3-starter</artifactId>
<version>${jobrunr.version}</version>
<exclusions>
<exclusion>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/fr/icdc/ebad/service/BatchService.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import fr.icdc.ebad.repository.SchedulingRepository;
import fr.icdc.ebad.security.SecurityUtils;
import fr.icdc.ebad.service.util.EbadServiceException;
import org.jobrunr.jobs.JobId;
import org.jobrunr.jobs.annotations.Job;
import org.jobrunr.scheduling.JobScheduler;
import org.slf4j.Logger;
Expand Down Expand Up @@ -254,7 +255,7 @@ public void deleteBatch(Long id) {
public void deleteScheduledJobFromBatch(Long batchId){
List<Scheduling> schedulings = schedulingRepository.findAllByBatchId(batchId);
schedulings.forEach(scheduling -> {
jobScheduler.delete(String.valueOf(scheduling.getId()));
jobScheduler.deleteRecurringJob(String.valueOf(scheduling.getId()));
schedulingRepository.delete(scheduling);
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/fr/icdc/ebad/service/EnvironnementService.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import fr.icdc.ebad.service.util.EbadServiceException;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import org.jobrunr.jobs.JobId;
import org.jobrunr.scheduling.JobScheduler;
import org.pf4j.PluginRuntimeException;
import org.pf4j.PluginWrapper;
Expand Down Expand Up @@ -154,7 +155,7 @@ public String getEspaceDisque(Long id) {
public void deleteScheduledJobFromEnvironment(Long environmentId){
List<Scheduling> schedulings = schedulingRepository.findAllByEnvironnementId(environmentId);
schedulings.forEach(scheduling -> {
jobScheduler.delete(String.valueOf(scheduling.getId()));
jobScheduler.deleteRecurringJob(String.valueOf(scheduling.getId()));
schedulingRepository.delete(scheduling);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/icdc/ebad/service/SchedulingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Scheduling saveAndRun(Long batchId, Long environnementId, String paramete
@Transactional
public void remove(Long schedulingId) {
Scheduling scheduling = schedulingRepository.getById(schedulingId);
jobScheduler.delete(String.valueOf(scheduling.getId()));
jobScheduler.deleteRecurringJob(String.valueOf(scheduling.getId()));
schedulingRepository.delete(scheduling);
}

Expand Down

0 comments on commit 69f25e5

Please sign in to comment.