oscerd commented on code in PR #23125:
URL: https://github.com/apache/camel/pull/23125#discussion_r3224560346


##########
components/camel-ai/camel-docling/src/main/java/org/apache/camel/component/docling/DoclingComponent.java:
##########
@@ -51,6 +58,26 @@ public DoclingComponent(CamelContext context) {
         this.configuration = new DoclingConfiguration();
     }
 
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+
+        // Start scheduled cleanup task for expired async tasks
+        long ttl = configuration.getAsyncTaskTtl();
+        long cleanupInterval = Math.max(ttl / 10, 60000); // Run cleanup every 
10% of TTL, minimum 1 minute
+
+        cleanupExecutor = getCamelContext().getExecutorServiceManager()
+                .newScheduledThreadPool(this, "DoclingAsyncTaskCleanup", 1);
+
+        cleanupExecutor.scheduleWithFixedDelay(
+                this::cleanupExpiredTasks,
+                cleanupInterval,
+                cleanupInterval,
+                TimeUnit.MILLISECONDS);
+
+        LOG.info("Started async task cleanup with TTL={}ms, cleanup 
interval={}ms", ttl, cleanupInterval);

Review Comment:
   Fixed in 7c1479fa90e — lowered all three call sites (`doStart`, 
`cleanupExpiredTasks` summary line, `doStop`) from `LOG.info` to `LOG.debug`. 
The per-task eviction log was already at DEBUG.
   
   _Claude Code on behalf of Andrea Cosentino_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to