mirror of
https://github.com/valitydev/three-ds-server-storage.git
synced 2024-11-06 00:15:16 +00:00
BJ-917: Make PreparationFlowService async
This commit is contained in:
parent
3df63949b5
commit
beb3152943
@ -3,7 +3,11 @@ package com.rbkmoney.threeds.server.storage;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@EnableRetry
|
||||
@EnableAsync
|
||||
@ServletComponentScan
|
||||
@SpringBootApplication
|
||||
public class ThreeDsServerStorageApplication extends SpringApplication {
|
||||
|
@ -6,7 +6,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.retry.annotation.Backoff;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.retry.annotation.Retryable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestClientResponseException;
|
||||
@ -14,7 +13,6 @@ import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@EnableRetry
|
||||
@RequiredArgsConstructor
|
||||
public class ThreeDsServerClient {
|
||||
|
||||
|
@ -4,17 +4,17 @@ import com.rbkmoney.threeds.server.domain.root.rbkmoney.RBKMoneyPreparationReque
|
||||
import com.rbkmoney.threeds.server.domain.root.rbkmoney.RBKMoneyPreparationResponse;
|
||||
import com.rbkmoney.threeds.server.storage.client.ThreeDsServerClient;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@EnableRetry
|
||||
@RequiredArgsConstructor
|
||||
public class PreparationFlowService {
|
||||
|
||||
private final ThreeDsServerClient client;
|
||||
private final PreparationFlowDataUpdater dataUpdater;
|
||||
|
||||
@Async
|
||||
public void init(String providerId) {
|
||||
String serialNum = dataUpdater.getCurrentSerialNum(providerId);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user