Skip to content

Commit

Permalink
make the document pipeline initalize in the apply method.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwatters committed Jul 27, 2023
1 parent f92549a commit cce9205
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/org/myrobotlab/service/DocumentPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static void main(String[] args) throws Exception {
// connector to pipeline connection
connector.attachDocumentListener(pipeline.getName());

Runtime.saveConfig("musicsearch");
Runtime.saveConfig("mediasearch");
// start the crawl!
boolean doCrawl = false;
if (doCrawl) {
Expand Down Expand Up @@ -216,6 +216,12 @@ public ServiceConfig apply(ServiceConfig inConfig) {
DocumentPipelineConfig config = (DocumentPipelineConfig)super.apply(inConfig);
//
this.workFlowConfig = config.workFlowConfig;
try {
initalize();
} catch (ClassNotFoundException e) {
log.error("Error initializing the document pipeline.", e);
// TODO: shoiuld we throw some runtime here?
}
return config;
}

Expand Down

0 comments on commit cce9205

Please sign in to comment.