[DOCU-1947] Ambiguous documentation for delay and maxDelay in listener configuration Created: 29/Jul/19  Updated: 09/Sep/19  Resolved: 06/Aug/19

Status: Closed
Project: Documentation
Component/s: documentation-examples
Affects Version/s: 6.1
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Marty Glaubitz Assignee: Ashraf Khamis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: 2019 mgnl-staff requests
Sprint: Docu Sprint 77
Story Points: 0.5

 Description   

The documentation of the listener configuration (https://documentation.magnolia-cms.com/display/DOCS61/Observation+module#Observationmodule-Listenerconfiguration) for the observation module mentions the existence of the delay and maxDelay properties, but doesn't explain which effect either of those have on the listeners behavior.



 Comments   
Comment by Christopher Zimmermann [ 05/Aug/19 ]

I agree its not clear what it means exactly if I use one or the other value - or what will happen if I use both. Using both seems nonsensical, but they are both used in the example on the page.

 

There is only: 

delay - Delay in milliseconds before the reaction is triggered.

maxDelay - Maximum delay milliseconds before the reaction is triggered.

Comment by Ashraf Khamis [ 05/Aug/19 ]

The delay and maxDelay properties essentially function like the start and end points of a range, and you cannot have one and not the other (checked with Rico).

From info.magnolia.cms.util.DelayedExecutor:

There are many places where we like to delay an execution (in case of a series of fired events). But we want to ensure that the task is executed after a certain maximum delay.

Based on this, I rewrote the description for each property:

delay

Ensures that the reaction is not triggered before a minimum delay time (in milliseconds) has elapsed.

For this to work, you have to define maxDelay.

maxDelay

Triggers the reaction after a maximum delay time (in milliseconds) is reached.

For this to work, you have to define delay.

Comment by Christopher Zimmermann [ 06/Aug/19 ]

maxDelay description sounds incorrect. Shouldn't it be:

Triggers the reaction before a maximum delay time (in milliseconds) is reached.

 

Suggestion:

Minimum delay (in milliseconds) before the reaction is triggered.

The delay and maxDelay properties form a range, and both values must be supplied to activate the feature. 

 

Maximum delay (in milliseconds) before the reaction is triggered.

The delay and maxDelay properties form a range, and both values must be supplied to activate the feature.

Comment by Christopher Zimmermann [ 06/Aug/19 ]

I am assuming that this is also incorrect/typo: "But we want to ensure that the task is executed after a certain maximum delay."

Comment by Ashraf Khamis [ 06/Aug/19 ]

It's from the Javadoc of info.magnolia.cms.util.DelayedExecutor, which Rico shared with me. It's not on our wiki.

Comment by Ashraf Khamis [ 06/Aug/19 ]

Property descriptions updated. nodeType=mgnl:contact typo fixed. All changes backported to DOCS6.0 and 5.7.

Generated at Mon Feb 12 01:22:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.