Skip to content

Commit

Permalink
feat. skru på ArenaEventProcessingJob igjen
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikv committed Dec 13, 2024
1 parent ee96bfd commit 7733614
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package no.nav.tag.tiltaksgjennomforing.arena.job;

import no.nav.tag.tiltaksgjennomforing.Miljø;
import no.nav.tag.tiltaksgjennomforing.arena.models.migration.ArenaAgreementAggregate;
import no.nav.tag.tiltaksgjennomforing.arena.service.ArenaAgreementService;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.concurrent.TimeUnit;

@Component
Expand All @@ -19,11 +21,11 @@ public ArenaAgreementJob(ArenaAgreementService arenaAgreementService) {

@Scheduled(fixedRate = 30, timeUnit = TimeUnit.SECONDS)
public void run() {
// List<ArenaAgreementAggregate> arenaAgreements = arenaAgreementService.getArenaAgreementsForProcessing();
//
// if (!arenaAgreements.isEmpty()) {
// arenaAgreementService.processAgreements(arenaAgreements);
// }
List<ArenaAgreementAggregate> arenaAgreements = arenaAgreementService.getArenaAgreementsForProcessing();

if (!arenaAgreements.isEmpty()) {
arenaAgreementService.processAgreements(arenaAgreements);
}
}

}

0 comments on commit 7733614

Please sign in to comment.