Giter VIP home page Giter VIP logo

Comments (7)

CheweyZ avatar CheweyZ commented on August 20, 2024

Also have iteration of

let tempTask=new D3NE.Task(inputs,(inps)=>{})
var task = new D3NE.Task(inputs, async(inps) => {
      console.log("Resolve");
      await resolveAfter2Seconds()
      console.log("Should Pass");
      return [tempTask.option(0)]
    })
  
    outputs[0] = task.output(0);
  }
});

from rete.

Ni55aN avatar Ni55aN commented on August 20, 2024

async Tasks are not supported at present time. The action function you pass to Task is calling without await . Therefore a following nodes are executed without waiting for the current one to done.
I'll take care of this at evening.

One more thing, why are you passing on tempTask.option(0) inside another task ? Worker should have one task.

from rete.

CheweyZ avatar CheweyZ commented on August 20, 2024

This is what i originally had but the issue was it would immediately pass even before promise had resolved

var componentDelayEvent = new D3NE.Component("Delay Event", {
  builder(node) {
    let act = new D3NE.Output("Action", actSocket),
        inp1 = new D3NE.Input("Action", actSocket)
    return node.addOutput(act).addInput(inp1);
  },
  worker(node, inputs, outputs) {
    var task = new D3NE.Task(inputs, async(inps) => {
      console.log("Resolve");
      await resolveAfter2Seconds()
      console.log("Should Send");
    })
    
    outputs[0] = task.option(0);
  }
});

from rete.

Ni55aN avatar Ni55aN commented on August 20, 2024

@CheweyZ new version v0.6.8 has been released with async Tasks
Example of use

from rete.

CheweyZ avatar CheweyZ commented on August 20, 2024

Thanks so much for fast fix and reply

from rete.

CheweyZ avatar CheweyZ commented on August 20, 2024

Another thing should maybe open another issue but the link https://github.com/Ni55aN/d3-node-editor/wiki/Tasks/#tasks found on https://github.com/Ni55aN/d3-node-editor/wiki/Engine Just takes you back to base wiki url is this intended?

from rete.

Ni55aN avatar Ni55aN commented on August 20, 2024

I have not filled out the page on wiki for this object yet. I'll deal with it a little later

from rete.

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.