mirror of
https://github.com/valitydev/fraudbusters-mg-connector.git
synced 2024-11-06 01:15:17 +00:00
Remove debug mode
This commit is contained in:
parent
ee89708053
commit
ffb9b470f5
@ -32,8 +32,7 @@ public class StartupListener implements ApplicationListener<ContextRefreshedEven
|
||||
|
||||
private void initKafkaStream(EventSinkFactory eventSinkFactory) {
|
||||
KafkaStreams kafkaStreams = eventSinkFactory.create();
|
||||
//TODO return after debug withdrawal
|
||||
// kafkaStreams.setUncaughtExceptionHandler(this::handleCriticalError);
|
||||
kafkaStreams.setUncaughtExceptionHandler(this::handleCriticalError);
|
||||
kafkaStreams.start();
|
||||
eventSinkStreamsPool.add(kafkaStreams);
|
||||
log.info("StartupListener start stream kafkaStreams: {}", kafkaStreams.allMetadata());
|
||||
|
@ -7,7 +7,6 @@ import com.rbkmoney.fraudbusters.mg.connector.mapper.Mapper;
|
||||
import com.rbkmoney.machinegun.eventsink.MachineEvent;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@ -15,9 +14,6 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class LogWithdrawalMapperDecorator implements Mapper<TimestampedChange, MachineEvent, Withdrawal> {
|
||||
|
||||
@Value("${stream.withdrawal.debug:false}")
|
||||
private boolean isDebug;
|
||||
|
||||
private final WithdrawalMapper withdrawalMapper;
|
||||
|
||||
@Override
|
||||
@ -30,9 +26,6 @@ public class LogWithdrawalMapperDecorator implements Mapper<TimestampedChange, M
|
||||
log.debug("Withdrawal map from change: {} event: {} ", change, event);
|
||||
Withdrawal withdrawal = withdrawalMapper.map(change, event);
|
||||
log.debug("Withdrawal map result: {}", withdrawal);
|
||||
if (isDebug) {
|
||||
return null;
|
||||
}
|
||||
return withdrawal;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user