Giter Site home page Giter Site logo

Comments (3)

johnhamelink avatar johnhamelink commented on May 27, 2024

Sorry for the huge wait time for a response for this - I've been super busy!

So from what I've read, the issue you're having is that the wait command skips the current event. That makes sense to me - the command is not supposed to send multiple results back and if it returned the current event it'd never wait for a new one. So it sounds like what you need to do is wrap Diplomat in a function that retrieves the current result and then drops into a loop of waiting.

Is that helpful?

JH

from diplomat.

ryansch avatar ryansch commented on May 27, 2024

@johnhamelink I already have a working example above. I was just pointing out that the mechanics of how Diplomat currently deals with events doesn't lend itself to treating it like an event stream where I can just handle each event as it comes in.

from diplomat.

johnhamelink avatar johnhamelink commented on May 27, 2024

@ryansch yeah, I get that now 😄 I guess there isn't really all that much that can be done though without massively increasing the complexity of Diplomat. The best thing in my opinion would be to write this functionality in another gem that depends on diplomat.

from diplomat.

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.