Hi is there any option to make dagster graph synch...
# ask-community
r
Hi is there any option to make dagster graph synchronous, like wait for complete one OP and than call other OP as per result of first OP, like in below graph i want to wait for return_one() completed than start add_one(), right now all OPS runs at a same time with out dependencies
Copy code
from dagster import graph, op


@op
def return_one(context) -> int:
    return 1


@op
def add_one(context, number: int):
    return number + 1


@op
def adder(context, a: int, b: int) -> int:
    return a + b


@graph
def inputs_and_outputs():
    value = return_one()
    a = add_one(value)
    b = add_one(value)
    adder(a, b)
dagster bot responded by community 1
z
You can use in-process execution if you just want them to execute one at a time. In your current example though I don't really understand how
add_one()
could execute before
return_one()
does as it's dependent on the output of
return_one()
, which is how Dagster infers its dependencies.