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

BUG: [PAGOPA-2300] delta exp time #160

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ microservice-chart: &microservice-chart
COSMOS_READ_REGION: "West Europe"
PAAINVIART_SERVICE_BUS_NAME: "nodo_wisp_paainviart_queue"
RECEIPT_TIMER_QUEUE_NAME: "nodo_wisp_payment_timeout_queue"
RECEIPT_TIMER_DELTA_ACTIVATE_EXPTIME_MS: '60000'
ECOMMERCE_HANG_TIMER_QUEUE_NAME: "nodo_wisp_ecommerce_hang_timeout_queue"
ECOMMERCE_HANG_TIMEOUT: '1800'
APIM_PATH: 'api.dev.platform.pagopa.it'
Expand Down
1 change: 1 addition & 0 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ microservice-chart: &microservice-chart
COSMOS_READ_REGION: "North Europe"
PAAINVIART_SERVICE_BUS_NAME: "nodo_wisp_paainviart_queue"
RECEIPT_TIMER_QUEUE_NAME: "nodo_wisp_payment_timeout_queue"
RECEIPT_TIMER_DELTA_ACTIVATE_EXPTIME_MS: '60000'
ECOMMERCE_HANG_TIMER_QUEUE_NAME: "nodo_wisp_ecommerce_hang_timeout_queue"
ECOMMERCE_HANG_TIMEOUT: '1800'
APIM_PATH: 'api.platform.pagopa.it'
Expand Down
1 change: 1 addition & 0 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ microservice-chart: &microservice-chart
COSMOS_READ_REGION: "West Europe"
PAAINVIART_SERVICE_BUS_NAME: "nodo_wisp_paainviart_queue"
RECEIPT_TIMER_QUEUE_NAME: "nodo_wisp_payment_timeout_queue"
RECEIPT_TIMER_DELTA_ACTIVATE_EXPTIME_MS: '60000'
ECOMMERCE_HANG_TIMER_QUEUE_NAME: "nodo_wisp_ecommerce_hang_timeout_queue"
ECOMMERCE_HANG_TIMEOUT: '1800'
APIM_PATH: 'api.uat.platform.pagopa.it'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.ErrorResponse;
Expand All @@ -38,6 +39,9 @@ public class ReceiptTimerController {
private final ReceiptTimerService receiptTimerService;

private final ErrorUtil errorUtil;

@Value("${wisp-converter.receipttimer-delta-activate.expirationtime.ms}")
private Long deltaExpirationTime;


@Operation(summary = "createTimer", description = "Create a timer linked with paymentToken and receipt data", security = {@SecurityRequirement(name = "ApiKey")}, tags = {"ReceiptTimer"})
Expand All @@ -53,6 +57,8 @@ public class ReceiptTimerController {
public void createTimer(@RequestBody ReceiptTimerRequest request) {
try {
log.info("Invoking API operation createTimer - args: {}", request.toString());
// PAGOPA-2300 - the expiration time is increased by a configurable delta
request.setExpirationTime(request.getExpirationTime()+deltaExpirationTime);
receiptTimerService.sendMessage(request);
log.info("Successful API operation createTimer");
} catch (Exception ex) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ wisp-converter.recovery.receipt-generation.wait-time.minutes=60
wisp-converter.ecommerce-hang.timeout.seconds=${ECOMMERCE_HANG_TIMEOUT:1800}
wisp-converter.wisp-rpt.timeout.seconds=${RPT_TIMEOUT:1800}

wisp-converter.receipttimer-delta-activate.expirationtime.ms=${RECEIPT_TIMER_DELTA_ACTIVATE_EXPTIME_MS:0}

## Exclude url from filter
filter.exclude-url-patterns=/swagger-ui/**,/v3/api-docs/**,/actuator/**

Expand Down
Loading