io.netty
netty-all
diff --git a/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java b/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java
index b0636c0c..7625d8bd 100644
--- a/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java
+++ b/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java
@@ -14,13 +14,14 @@
import org.apache.commons.lang3.StringUtils;
import org.phoebus.channelfinder.entity.Channel;
import org.phoebus.channelfinder.entity.Property;
-import org.phoebus.channelfinder.service.external.ArchiverClient;
+import org.phoebus.channelfinder.service.external.ArchiverService;
import org.phoebus.channelfinder.service.model.archiver.ChannelProcessorInfo;
import org.phoebus.channelfinder.service.model.archiver.aa.ArchiveAction;
import org.phoebus.channelfinder.service.model.archiver.aa.ArchivePVOptions;
import org.phoebus.channelfinder.service.model.archiver.aa.ArchiverInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
/**
@@ -31,6 +32,7 @@
* e.g. archive=monitor@1.0
*/
@Configuration
+@ConditionalOnProperty(name = "aa.enabled", havingValue = "true")
public class AAChannelProcessor implements ChannelProcessor {
private static final Logger logger = Logger.getLogger(AAChannelProcessor.class.getName());
@@ -60,7 +62,7 @@ public class AAChannelProcessor implements ChannelProcessor {
@Value("${aa.auto_pause:}")
private List autoPauseOptions;
- @Autowired private final ArchiverClient archiverClient = new ArchiverClient();
+ @Autowired private ArchiverService archiverService;
@Override
public boolean enabled() {
@@ -180,7 +182,7 @@ public long process(List channels) throws JsonProcessingException {
Collectors.toMap(ArchivePVOptions::getPv, archivePVOptions -> archivePVOptions));
Map> archiveActionArchivePVMap =
getArchiveActions(archivePVSList, archiverInfo);
- count += archiverClient.configureAA(archiveActionArchivePVMap, archiverInfo.url());
+ count += archiverService.configureAA(archiveActionArchivePVMap, archiverInfo.url());
}
long finalCount = count;
logger.log(Level.INFO, () -> String.format("Configured %s channels.", finalCount));
@@ -240,7 +242,7 @@ private Map> getArchiveActions(
return result;
}
List