Browse Source

replica update 2

master
gsd 2 years ago
parent
commit
0e64f1957a
  1. 2
      src/main/java/app/services/ShardingService.java
  2. 2
      src/main/java/app/services/db/DetectService.java
  3. 2
      src/main/java/app/services/db/DonateService.java
  4. 2
      src/main/java/app/services/db/UsertimeService.java
  5. 2
      src/main/java/app/updates/BanCountUpdater.java
  6. 2
      src/main/java/app/updates/CountriesUpdater.java
  7. 2
      src/main/java/app/updates/UniqueUpdater.java

2
src/main/java/app/services/ShardingService.java

@ -5,10 +5,12 @@ import jakarta.persistence.EntityManager;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@Service @Service
@Transactional("RoTransactionManager")
public class ShardingService { public class ShardingService {
@Autowired @Autowired

2
src/main/java/app/services/db/DetectService.java

@ -9,10 +9,12 @@ import jakarta.persistence.PersistenceContext;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
@Service @Service
@Transactional("RoTransactionManager")
public class DetectService { public class DetectService {
EntityManager entityManager; EntityManager entityManager;

2
src/main/java/app/services/db/DonateService.java

@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
@ -20,6 +21,7 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
@Component @Component
@Transactional("RoTransactionManager")
public class DonateService { public class DonateService {
EntityManager entityManager; EntityManager entityManager;

2
src/main/java/app/services/db/UsertimeService.java

@ -16,7 +16,7 @@ import java.sql.Timestamp;
import java.util.*; import java.util.*;
@Service @Service
@Transactional @Transactional("RoTransactionManager")
public class UsertimeService { public class UsertimeService {
EntityManager entityManager; EntityManager entityManager;

2
src/main/java/app/updates/BanCountUpdater.java

@ -10,10 +10,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant; import java.time.Instant;
@Component @Component
@Transactional("RoTransactionManager")
public class BanCountUpdater extends BaseUpdater{ public class BanCountUpdater extends BaseUpdater{
private Stats stats; private Stats stats;
@Value("${backend.updates.ban_count}") @Value("${backend.updates.ban_count}")

2
src/main/java/app/updates/CountriesUpdater.java

@ -13,12 +13,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.io.IOException; import java.io.IOException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.Map; import java.util.Map;
@Component @Component
@Transactional("RoTransactionManager")
public class CountriesUpdater extends BaseUpdater{ public class CountriesUpdater extends BaseUpdater{
Stats stats; Stats stats;
GeoIP geoIP; GeoIP geoIP;

2
src/main/java/app/updates/UniqueUpdater.java

@ -11,10 +11,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import static java.time.Instant.now; import static java.time.Instant.now;
@Component @Component
@Transactional("RoTransactionManager")
public class UniqueUpdater extends BaseUpdater{ public class UniqueUpdater extends BaseUpdater{
Stats stats; Stats stats;

Loading…
Cancel
Save