Giter Site home page Giter Site logo

Comments (4)

fridex avatar fridex commented on May 23, 2024

Yes, you are right. I will update the docs.

To run some flow (let's say "myFlow"), just call run_flow function and supply arguments to the flow:

from selinon import run_flow

run_flow('myFlow', node_args={'foo': 'bar'})

If you would like to run only some tasks in a flow, use the run_flow_selective function:

from selinon import run_flow_selective

run_flow_selective('myFlow', ['Task1', 'Task2'], node_args={'foo': 'bar'})

If there is anything unclear, feel free to ask.

from selinon.

dusteye avatar dusteye commented on May 23, 2024

I have another quetion: how to fetch the flow result? I found that run_flow result is a celery asyncResult, but use get method celery asyncResult, it's blocked and can not return.

from selinon.

fridex avatar fridex commented on May 23, 2024

I have another quetion: how to fetch the flow result? I found that run_flow result is a celery asyncResult, but use get method celery asyncResult, it's blocked and can not return.

The run_flow function returns async result for dispatcher that is handling the requested flow. Results are stored on task level based on assigned adapters. There is no mechanism to get results of all tasks in the flow as they can use different storages and the structure of stored results in storages/adapters is left on users.

You can run a flow with arguments based on which you can query storage/database in the adapter implementation - you can request the given storage adapter from pool and call querying methods to get results. You need to know at least task name (and possibly storage adapter) that results you want to get.

It might sound difficult, but it is not. I can provide you some example if you want.

from selinon.

fridex avatar fridex commented on May 23, 2024

OK, I will close this. @dusteye feel free to reopen if more input is needed.

from selinon.

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.