Giter VIP home page Giter VIP logo

Comments (5)

jeffpeiyt avatar jeffpeiyt commented on June 2, 2024

@harjitdotsingh thanks for trying parallec.

It should run once. Could you please paste your code here or print some debugging information?

Could you please check the samples here and compare with your code?
https://github.com/eBay/parallec-samples

from parallec.

harjitdotsingh avatar harjitdotsingh commented on June 2, 2024

Here is the code

ParallelTask pt = parallelClient.prepareHttpGet("/search/query?q=$QUERY")
                .setHttpHeaders(new ParallecHeader().addPair("x-user", env.getProperty("ifi.user")).addPair("x-password", env.getProperty("ifi.password"))).setProtocol(RequestProtocol.HTTPS)
                .setHttpPort(443)
                .async()
                .setReplaceVarMapToSingleTargetSingleVar("QUERY", queryList, "cdws21.ificlaims.com")
                .setResponseContext(returnMap)
                .execute((res, responseContext) -> {
                    String resourcePath = res.getRequest().getResourcePath();
                    String keyword = resourcePath.substring(resourcePath.lastIndexOf('=') + 1);
                    returnMap.put(keyword, res.getResponseContent());

                });

When I look in the output , it keeps giving me the output from the last run task at a fixed interval. Is there a way to pause the task handling or is it that the Actors are running and waiting for the next task to be processed ?

from parallec.

jeffpeiyt avatar jeffpeiyt commented on June 2, 2024

@harjitdotsingh it should only execute each api once. Could you call http://www.parallec.io/javadoc/io/parallec/core/ParallelTask.html#prettyPrintInfo-- on the paralleltask to see the output? Also can you first reduce the query list to a single one and remove the async() mode so that you can quickly debug?

also you can refer to https://github.com/eBay/parallec-samples/blob/master/sample-apps/src/main/java/io/parallec/sample/app/http/HttpBasicAsyncRunProgressPollingApp.java for the async polling and get the aggregated summary

also check on if there are duplicated items in queryList

from parallec.

harjitdotsingh avatar harjitdotsingh commented on June 2, 2024

The issue isn't happening now. I don't why it kept sending the same request again and again at a fixed interval. It may have been a one off. I will keep an eye out. I think we can close it now

from parallec.

jeffpeiyt avatar jeffpeiyt commented on June 2, 2024

Cool. Let me know if it happens again.

from parallec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.