Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion: add a property to recognize whether the graph instance is interrupted #758

Open
vianvio opened this issue Dec 24, 2024 · 0 comments

Comments

@vianvio
Copy link

vianvio commented Dec 24, 2024

Thanks for the great update of implementing intrerrupt and Command resume, I have integrated these features in my app, but found it unclear to figure out whether the instance is interrupted.

currently I'm using next node for check

const nextNode = (await flowInstance.getState(config)).next;
if (Array.isArray(nextNode) && nextNode.length > 0) {
  // do something
}

and I find the test case is using number of tasks on state for check

const currTasks = (await graph.getState(config)).tasks;
expect(currTasks[0].interrupts).toHaveLength(1);

Both should work but not good I think, can we have a property like isInterrupted or interruption: true, that would be more friendly to use

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

No branches or pull requests

1 participant