Skip to content

Commit 4000878

Browse files
crispybaconjoegallodebadair
authored
Reword the watcher 'always' and 'never' condition docs (#86105)
* Setting these values to True or False results in an error. * Oops, this should stay as 'always' * Tidy up some whitespace * Reword these in terms of condition results * Apply suggestions from code review Co-authored-by: debadair <[email protected]> Co-authored-by: Joe Gallo <[email protected]> Co-authored-by: Joe Gallo <[email protected]> Co-authored-by: debadair <[email protected]>
1 parent 9b2f31b commit 4000878

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

x-pack/docs/en/watcher/condition.asciidoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
++++
77

88
When a watch is triggered, its condition determines whether or not to execute
9-
the watch actions. {watcher} supports the following condition types:
9+
the watch actions. {watcher} supports the following condition types:
1010

11-
* <<condition-always,`always`>>: set the watch condition to `true` so the watch
12-
actions are always executed.
13-
* <<condition-never,`never`>>: set the watch condition to `false` so the watch
11+
* <<condition-always,`always`>>: The condition always evaluates to `true`, so the watch actions are always performed.
12+
* <<condition-never,`never`>>: The condition always evaluates to `false`, so the watch
1413
actions are never executed.
1514
* <<condition-compare,`compare`>>: perform simple comparisons against values
1615
in the watch payload to determine whether or not to execute the watch actions.
1716
* <<condition-array-compare,`array_compare`>>: compare an array of values in the
18-
watch payload to a given value to determine whether or not to execute the watch
17+
watch payload to a given value to determine whether or not to execute the watch
1918
actions.
2019
* <<condition-script,`script`>>: use a script to determine whether or not to
2120
execute the watch actions.

x-pack/docs/en/watcher/condition/always.asciidoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
<titleabbrev>Always condition</titleabbrev>
66
++++
77

8-
Use the `always` condition to set the condition to `true`. This forces the watch
9-
actions to be executed unless they are <<actions-ack-throttle,throttled>>.
8+
Use the `always` condition to perform the watch actions whenever the watch is triggered, unless they are
9+
<<actions-ack-throttle,throttled>>.
1010

11-
The `always` condition enables you to perform watch actions on a fixed schedule,
12-
such as, _"Every Friday at noon, send a status report email to
11+
The `always` condition enables you to perform watch actions on a fixed schedule,
12+
such as, _"Every Friday at noon, send a status report email to
1313
1414

1515
==== Using the always condition
1616

1717
This is the default if you omit the condition definition from a watch.
1818

19-
There are no attributes to specify for the `always` condition. To explicitly
20-
use this condition, specify the condition type and associate it with an empty
19+
There are no attributes to specify for the `always` condition. To explicitly
20+
use this condition, specify the condition type and associate it with an empty
2121
object:
2222

2323
[source,js]
@@ -26,4 +26,4 @@ object:
2626
"always" : {}
2727
}
2828
--------------------------------------------------
29-
// NOTCONSOLE
29+
// NOTCONSOLE

x-pack/docs/en/watcher/condition/never.asciidoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
<titleabbrev>Never condition</titleabbrev>
66
++++
77

8-
Use the `never` condition to set the condition to `false`. This means the
9-
watch actions are never executed when the watch is triggered. The watch input is
10-
executed, a record is added to the watch history, and the watch execution ends.
8+
Use the `never` condition to skip performing the watch actions whenever the watch is triggered. The watch input is processed, a record is
9+
added to the watch history, and watch execution ends.
1110
This condition is generally used for testing.
1211

1312
==== Using the never condition
@@ -21,4 +20,4 @@ you specify the condition type and associate it with an empty object:
2120
"never" : {}
2221
}
2322
--------------------------------------------------
24-
// NOTCONSOLE
23+
// NOTCONSOLE

0 commit comments

Comments
 (0)