He-Pin opened a new issue, #1821:
URL: https://github.com/apache/pekko/issues/1821

   Maybe implemented with `aggregateWithBoundary`?
   
   eg:
   ```java
                this.ollamaApi.pullModel(new PullModelRequest(modelName))
                                
.bufferUntilChanged(OllamaApi.ProgressResponse::status)
                                .doOnEach(signal -> {
                                        var progressResponses = signal.get();
                                        if 
(!CollectionUtils.isEmpty(progressResponses) && 
progressResponses.get(progressResponses.size() - 1) != null) {
                                                logger.info("Pulling the '{}' 
model - Status: {}", modelName, progressResponses.get(progressResponses.size() 
- 1).status());
                                        }
                                })
                                .takeUntil(progressResponses ->
                                        progressResponses.get(0) != null && 
"success".equals(progressResponses.get(0).status()))
                                .timeout(this.options.timeout())
                                
.retryWhen(Retry.backoff(this.options.maxRetries(), Duration.ofSeconds(5)))
                                .blockLast();
   ```


-- 
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: notifications-unsubscr...@pekko.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to