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

sleep(1000)->100.0%panic ,panic is not executed #20

Open
fananchong opened this issue Mar 20, 2022 · 2 comments
Open

sleep(1000)->100.0%panic ,panic is not executed #20

fananchong opened this issue Mar 20, 2022 · 2 comments
Labels
feature new feature

Comments

@fananchong
Copy link

func (t *terms) eval() (interface{}, error) {
	t.mu.Lock()
	defer t.mu.Unlock()
	for _, term := range t.chain {
		if term.mods.allow() {
			return term.do(), nil
		}
	}
	return nil, nil
}

return term.do(), nil causes the following term to not be executed

@ahrtr
Copy link
Member

ahrtr commented Nov 24, 2022

It's a real problem. Probably we should redefine the format to support both AND and OR.

  • AND: evaluate all terms;
  • OR: evaluate the first allowed term.

@ahrtr
Copy link
Member

ahrtr commented Dec 2, 2022

@serathius Any interest on this feature? cc @ptabor as well.

@ahrtr ahrtr added the feature new feature label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature
Development

No branches or pull requests

2 participants