<commit_before>package fi.otavanopisto.kuntaapi.server.integrations.ptv.updaters;

import java.time.OffsetDateTime;
import java.util.concurrent.TimeUnit;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.ejb.AccessTimeout;
import javax.ejb.Singleton;
import javax.ejb.TimerService;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import fi.metatavu.ptv.client.ApiResponse;
import fi.metatavu.ptv.client.model.V3VmOpenApiGuidPage;
import fi.otavanopisto.kuntaapi.server.integrations.ptv.client.PtvApi;

@ApplicationScoped
@Singleton
@AccessTimeout (unit = TimeUnit.HOURS, value = 1l)
@SuppressWarnings ("squid:S3306")
public class PtvServiceChannelPriorityIdUpdater extends AbstractPtvServiceChannelIdUpdater {
  
  @Inject
  private PtvApi ptvApi;
  
  @Resource
  private TimerService timerService;

  private OffsetDateTime currentUpdateStart;
  
  private OffsetDateTime lastUpdate;
    
  @PostConstruct
  public void init() {
    lastUpdate = OffsetDateTime.now().minusHours(1);
  }
  
  @Override
  public String getName() {
    return "service-channels-priority";
  }
  
  @Override
  public TimerService getTimerService() {<commit_msg>Review changes<commit_after>package fi.otavanopisto.kuntaapi.server.integrations.ptv.updaters;

import java.time.OffsetDateTime;
import java.util.concurrent.TimeUnit;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.ejb.AccessTimeout;
import javax.ejb.Singleton;
import javax.ejb.TimerService;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import fi.metatavu.ptv.client.ApiResponse;
import fi.metatavu.ptv.client.model.V3VmOpenApiGuidPage;
import fi.otavanopisto.kuntaapi.server.integrations.ptv.client.PtvApi;

@ApplicationScoped
@Singleton
@AccessTimeout (unit = TimeUnit.HOURS, value = 1l)
@SuppressWarnings ("squid:S3306")
public class PtvServiceChannelPriorityIdUpdater extends AbstractPtvServiceChannelIdUpdater {
  
  @Inject
  private PtvApi ptvApi;
  
  @Resource
  private TimerService timerService;

  private OffsetDateTime currentUpdateStart;
  
  private OffsetDateTime lastUpdate;
    
  @PostConstruct
  public void init() {
    lastUpdate = OffsetDateTime.now().minusHours(1);
  }
  
  @Override
  public String getName() {
    return "service-channel-priority-ids";
  }
  
  @Override
  public TimerService getTimerService() {
{'fraction_non_alphanumeric': 0.0885502471169687, 'fraction_numerical': 0.005766062602965404, 'mean_word_length': 5.477333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4050670', 'n_tokens_mistral': 786, 'n_tokens_neox': 775, 'n_words': 141}