diff --git a/admin_manual/webhook_listeners/index.rst b/admin_manual/webhook_listeners/index.rst index 0afbcff6e94..dd10f4cfa40 100644 --- a/admin_manual/webhook_listeners/index.rst +++ b/admin_manual/webhook_listeners/index.rst @@ -33,6 +33,18 @@ If you would like to enforce multiple criteria, you can simply pass multiple pro You can also use additional comparison operators (``$eq, $ne, $gt, $gte, $lt, $lte, $in, $nin``) as well as logical operators (``$and, $or, $not, $nor``). For example use ``{ "time" : { "$lt": 1711971024 } }`` to accept only events prior to April 1st 2024 and ``{ "time" : { "$not": { "$lt": 1711971024 } } }`` to accept events after April 1st 2024. +Speeding up webhook dispatch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This app uses background jobs to trigger the registered webhooks. Thus, by default, webhooks will be triggered only every 5 minutes, as the default cron interval is 5 minutes. +To trigger webhooks earlier, you can set up a background job worker. The following command will launch a worker for the webhook call background job: + +.. code-block:: bash + + occ background-job:worker "OCA\\WebhookListeners\\BackgroundJobs\\WebhookCall" + +It is recommended to restart this worker once a day to make sure code changes are effective and avoid memory leaks, for example by registering it as a systemd service with a daily timer. + Nextcloud Webhook Events ------------------------ diff --git a/admin_manual/windmill_workflows/index.rst b/admin_manual/windmill_workflows/index.rst index eaf78c6b2aa..7c300a1d479 100644 --- a/admin_manual/windmill_workflows/index.rst +++ b/admin_manual/windmill_workflows/index.rst @@ -66,6 +66,11 @@ Approval/Suspend steps Windmill allows using so-called approval steps, which are essentially asynchronous scripts that wait for the call to an additional webhook URL. The most prominent use case for this are approval workflows where you get automated input from somewhere which needs to be approved by a human. Once the human approves or disapproves by triggering the webhook URL the workflow will resume. +In order to turn a newly added step into an approval step, the workflow edit screen, select the script and in the bottom right pan, go in the "Advanced" tab, "Suspend" sub tab and check "Suspend/Approval/Prompt". + +.. image:: images/windmill_approval_step_config.png + :alt: Screenshot of the workspace edit screen to turn a normal step into an Approval step + Using the scripts provided for Nextcloud, you can send approval links to the humans in charge of approving via Nextcloud Talk or a simple notification in Nextcloud. Of course, you may also use any of the other scripts for sending messages available in the Windmill hub. -Windmill has a default approval user interface at a specific URL, but it is not very nice. We recommend using the ``approve_links`` apps which allows creating a beautiful temporary approval page with a custom message and approve and disapprove buttons. +Windmill has a default approval user interface at a specific URL, but it is not very nice. We recommend using the `approve_links `_ app which allows creating a beautiful temporary approval page with a custom message and approve and disapprove buttons.