Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vaas/skru av send gamle udelte referater #901

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ open class OversiktenService(
private val log = LoggerFactory.getLogger(OversiktenService::class.java)
private val erProd = EnvironmentUtils.isProduction().orElse(false)

// @Scheduled(cron = "0 0 * * * *") // Hver time
// @SchedulerLock(name = "oversikten_melding_med_metadata_scheduledTask", lockAtMostFor = "PT3M")
@Scheduled(cron = "0 0 * * * *") // Hver time
@SchedulerLock(name = "oversikten_melding_med_metadata_scheduledTask", lockAtMostFor = "PT3M")
open fun sendUsendteMeldingerTilOversikten() {
val kanPublisereMeldinger = !EnvironmentUtils.isProduction().getOrElse { false } && !EnvironmentUtils.isDevelopment().getOrElse { false }

Expand All @@ -44,8 +44,12 @@ open class OversiktenService(
}
}

@Scheduled(cron = "0 50 13 * * ?")
@SchedulerLock(name = "oversikten_melding_gamle_udelte_scheduledTask", lockAtMostFor = "PT15M")
// Brukt til å hente gamle udelte samtalereferater der det ikke allerede er sendt melding.
// Dette er en engangsjobb som ble kjørt i PROD 20.12.24 kl 13:50
// Koden skal stå inntil videre, i tilfelle det dukker opp noen bugs
//
// @Scheduled(cron = "0 50 13 * * ?")
// @SchedulerLock(name = "oversikten_melding_gamle_udelte_scheduledTask", lockAtMostFor = "PT15M")
open fun sendAlleGamleUdelte() {
val alleUdelte = oversiktenMeldingMedMetadataRepository.hentUdelteSamtalereferatDerViIkkeHarSendtMeldingTilOversikten()
log.info("antall udelte referat", alleUdelte.size)
Expand Down
Loading