Merge pull request 'refactor: update sorting criteria for manga import jobs and enable resilience features' (#41) from refactor-architecture into main
Reviewed-on: #41
This commit is contained in:
commit
695e04c670
@ -4,12 +4,14 @@ import org.springframework.amqp.rabbit.annotation.EnableRabbit;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
import org.springframework.resilience.annotation.EnableResilientMethods;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableFeignClients
|
@EnableFeignClients
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@EnableRabbit
|
@EnableRabbit
|
||||||
|
@EnableResilientMethods
|
||||||
public class MangamochiApplication {
|
public class MangamochiApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@ -223,9 +223,7 @@ public class ContentImportService {
|
|||||||
|
|
||||||
var sortedPageable =
|
var sortedPageable =
|
||||||
PageRequest.of(
|
PageRequest.of(
|
||||||
pageable.getPageNumber(),
|
pageable.getPageNumber(), pageable.getPageSize(), Sort.by(Sort.Direction.DESC, "id"));
|
||||||
pageable.getPageSize(),
|
|
||||||
Sort.by(Sort.Direction.DESC, "updatedAt"));
|
|
||||||
|
|
||||||
var page = mangaImportJobRepository.findAll(spec, sortedPageable).map(MangaImportJobDTO::from);
|
var page = mangaImportJobRepository.findAll(spec, sortedPageable).map(MangaImportJobDTO::from);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user