Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matej Novotny <[email protected]>
  • Loading branch information
mkouba and manovotn authored Sep 27, 2024
1 parent 129b98b commit 673f75a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/src/main/asciidoc/scheduler-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,10 @@ void everyTwoSeconds() { }

`@Scheduled#executionMaxDelay()` can be set to delay each execution of a scheduled method.
The value represents the maximum delay between the activation of the trigger and the execution of the scheduled method.
The actual delay varies randomly over time but it never exceeds the maximum value.
The actual delay is a randomized number between 0 and the maximum specified delay.

The value is parsed with `DurationConverter#parseDuration(String)`.
It can be a property expression.
In that case, the scheduler attempts to use the configured value instead: `@Scheduled(executionMaxDelay = "${myJob.maxDelay}")`.
It can be a property expression, in which case, the scheduler attempts to use the configured value instead: `@Scheduled(executionMaxDelay = "${myJob.maxDelay}")`.

Check warning on line 271 in docs/src/main/asciidoc/scheduler-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using ', which (non restrictive clause preceded by a comma)' or 'that (restrictive clause without a comma)' rather than 'which'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using ', which (non restrictive clause preceded by a comma)' or 'that (restrictive clause without a comma)' rather than 'which'.", "location": {"path": "docs/src/main/asciidoc/scheduler-reference.adoc", "range": {"start": {"line": 271, "column": 36}}}, "severity": "INFO"}
Additionally, the property expression can specify a default value:
`@Scheduled(executionMaxDelay = "${myJob.maxDelay}:500ms}")`.

Expand All @@ -278,7 +277,7 @@ Additionally, the property expression can specify a default value:
@Scheduled(every = "2s", executionMaxDelay = "500ms") <1>
void everyTwoSeconds() { }
----
<1> The delay will be a value between 0 and 500 milliseconds. As a result, the period between to `everyTwoSeconds()` executions will be roughly between two and two and a half seconds.
<1> The delay will be a value between 0 and 500 milliseconds. As a result, the period between to `everyTwoSeconds()` executions will be roughly between one and a half and two and a half seconds.

[[concurrent_execution]]
=== Concurrent Execution

Check warning on line 283 in docs/src/main/asciidoc/scheduler-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in '1.7. Concurrent Execution'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in '1.7. Concurrent Execution'.", "location": {"path": "docs/src/main/asciidoc/scheduler-reference.adoc", "range": {"start": {"line": 283, "column": 1}}}, "severity": "INFO"}

Check warning on line 283 in docs/src/main/asciidoc/scheduler-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/scheduler-reference.adoc", "range": {"start": {"line": 283, "column": 1}}}, "severity": "INFO"}
Expand Down

0 comments on commit 673f75a

Please sign in to comment.