From fc5a3f0cd56abada55b2bcc2e123c5e0822cf977 Mon Sep 17 00:00:00 2001 From: Marek Stransky Date: Fri, 15 Mar 2024 12:02:54 +0100 Subject: [PATCH] Write docs --- docs/Using-Operations-Service.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/Using-Operations-Service.md b/docs/Using-Operations-Service.md index 4da3192..12bc4d2 100644 --- a/docs/Using-Operations-Service.md +++ b/docs/Using-Operations-Service.md @@ -107,6 +107,12 @@ if (!operationsService.isPollingOperations) { } ``` +### Default and Minimum TimeInterval Enforcement + +For convenience, there is a default implementation where you can omit the polling interval and it is automatically set to 7 seconds. If you specify an interval below 5 seconds, it will be automatically adjusted to 5 seconds to prevent server overload. + +### Setting up a delegate + To receive the result of the polling, set up a delegate. @@ -148,6 +154,10 @@ class MyOperationsManager: WMTOperationsDelegate { Polling behavior can be adjusted by the `pollingOptions` parameter when [creating an instance](#creating-an-instance) of the service. +### Best Practices and Recommendations + +For optimal server performance, consider adjusting polling intervals based on your application's requirements. For instance, when push notifications are enabled, it's advisable to double the polling interval to minimize server load. + ## Approve an Operation To approve an operation use `WMTOperations.authorize`. You can simply use it with the following examples: