You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, It's perfectly fine if this question is non-answerable!
I was just curious how is the DAG structure maintained when we directly pass result.Jobs into insertMany.
One could use priority but that'll not always work (eg. C and D depend on A and B respectively and we don't know in advance if A or B will finish first, so someone will be waiting).
// Prepare the workflow for insertion and validate it:result, err:=riverworkflow.Prepare(ctx, riverClient, SampleWorkflow())
iferr!=nil {
panic(err)
}
// The result.Jobs field holds a slice of river.InsertManyOpts which can be// enqueued with a riverClient.InsertMany / InsertManyTx call:if_, err:=riverClient.InsertMany(ctx, result.Jobs); err!=nil {
panic(err)
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Now, It's perfectly fine if this question is non-answerable!
I was just curious how is the DAG structure maintained when we directly pass
result.Jobs
into insertMany.One could use
priority
but that'll not always work (eg. C and D depend on A and B respectively and we don't know in advance if A or B will finish first, so someone will be waiting).Beta Was this translation helpful? Give feedback.
All reactions