feat: implement Validate to check for cycle

This commit is contained in:
sujit
2024-10-22 12:40:14 +05:45
parent a84ff6d831
commit ea0a7022f9
6 changed files with 83 additions and 75 deletions

View File

@@ -52,7 +52,12 @@ func Sync() {
func aSync() {
f := dag.NewDAG("Sample DAG", "sample-dag", mq.WithCleanTaskOnComplete(), mq.WithNotifyResponse(tasks.NotifyResponse))
setup(f)
err := f.Start(context.TODO(), ":8083")
err := f.Validate()
if err != nil {
panic(err)
}
err = f.Start(context.TODO(), ":8083")
if err != nil {
panic(err)
}