We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
precondition
Brief overview
We aim to support more complex conditions in the preconditions field.
preconditions
We suggest allowing the use of JavaScript in the condition field.
Javascript
preconditions: - condition: "$EXIT_CODE == 1 || $EXIT_CODE == 2" expected: true
Option 1: Functional Programming
preconditions: - condition: "(or (eq $EXIT_CODE 1) (eq $EXIT_CODE 2))" expected: true
Option 2: Logic Programming
preconditions: - condition: "member($EXIT_CODE, [1, 2])" expected: true
operator
preconditions: - condition: "$EXIT_CODE" operator: "ne" expected: "2"
When operator field is not provided, it will be handled as "eq". Valid values are as follows:
!=
ne
==
eq
>=
ge
>
gt
<=
le
<
lt
OR
AND
conditions
Complex example that matches only when EXIT_CODE is neither 1 or 2:
1
2
preconditions: operator: "AND" conditions: - condition: "$EXIT_CODE" operator: "ne" expected: "1" - condition: "$EXIT_CODE" operator: "ne" expected: "2"
The text was updated successfully, but these errors were encountered:
you can check particular addition here: https://github.com/kriyanshii/dagu/commits/cbfe4cb9af7cdee6cc32766c3784ba2260ac5858
Sorry, something went wrong.
I'm closing this issue since we have added some functionality to allow setting complex conditions for precondition.
No branches or pull requests
Brief overview
We aim to support more complex conditions in the
preconditions
field.Proposed solution: Inline script
We suggest allowing the use of JavaScript in the condition field.
Javascript
Alternative Approaches
Option 1: Functional Programming
Option 2: Logic Programming
Alternative solution:
operator
fieldWhen operator field is not provided, it will be handled as "eq". Valid values are as follows:
!=
orne
==
oreq
>=
orge
>
orgt
<=
orle
<
orlt
OR
orAND
conditions
Complex example that matches only when EXIT_CODE is neither
1
or2
:The text was updated successfully, but these errors were encountered: