Skip to content

Conversation

@AHHH32
Copy link

@AHHH32 AHHH32 commented Jun 24, 2024

我在使用获取全部定义的dag时,发现源码中已经有相关函数实现,但是没有在Store中进行声明,因此不能使用。这个修改是在Store中添加函数声明

Copy link
Author

@AHHH32 AHHH32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add

GetTaskIns(taskIns string) (*entity.TaskInstance, error)
GetDag(dagId string) (*entity.Dag, error)
GetDagInstance(dagInsId string) (*entity.DagInstance, error)
ListDag(input *ListDagInput) ([]*entity.Dag, error)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也得在 MockStore 实现这个接口,不然之前的用例会失败

Copy link
Author

@AHHH32 AHHH32 Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请问你说的之前的用例会失败是什么意思?因为我现在这么用的目前没发现,并且我这样可以正常获取到定义的dag。

	store := mod.GetStore()
	if store == nil {
		return  nil
	}
	dagDefine, err := store.ListDag(nil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants