ECA processing queued task¶
Plugin ID: eca_queue:processing_task
Available since: 1.0.0
Provided tokens
| Token | Description |
|---|---|
[user] |
The current user. Alias: current_user |
[htmx] |
Information about the current HTMX request. |
[htmx:is_request] |
Whether the current request was sent by HTMX ("1" or "0"). |
[htmx:boosted] |
Whether the current request was boosted by HTMX ("1" or "0"). |
[htmx:history_restore] |
Whether the current request is for HTMX history restoration ("1" or "0"). |
[htmx:target] |
The identifier of the element the response is targeted at. |
[htmx:trigger] |
The identifier of the element that triggered the request. On Drupal 11 this is the element id, on Drupal 12 and later it is the CSS selector that htmx 4 sends. Prefer "trigger_name", which means the same thing on both. |
[htmx:trigger_name] |
The name attribute of the element that triggered the request, or empty if it has none. This has the same meaning on all supported Drupal versions. |
[htmx:source] |
The CSS selector of the element that triggered the request, for example button[name="first_item"]. Empty on Drupal 11, which does not send this information. |
[htmx:request_type] |
Whether the request targets a full page or a fragment: "full" or "partial". Empty on Drupal 11, which does not send this information. |
[htmx:current_url] |
The URL of the page the request was sent from. |
[event] |
The event. |
[event:machine_name] |
The machine name of the ECA event. |
[session_user] |
The user account that dispatched the event, regardless if ECA is processing models under a different account. This is only available if ECA is configured to always run under a specific account. |
Fires when a queued ECA task is being processed. Tasks are placed in the queue by the 'Enqueue task' action and processed during cron or manually.
The task carries token data set by the action that enqueued it, making those tokens available to subsequent actions and conditions.
Fields¶
Task name— config key:task_name-
The task name will be used to identify, what type of task is to be processed. When multiple tasks are created that are of the same nature, they should share the same task name.
Type:
textfield· Required: yes · Default: empty stringThe task name used to identify what type of task is being processed. Must match the task name used in the 'Enqueue task' action.
Task value (optional)— config key:task_value-
Type:
textfield· Required: no · Default: empty stringAn optional additional value for finer-grained filtering. Combined with the task name to determine which ECA model handles the task.
Distribute: Process tasks of this name in their own queue.— config key:distribute-
Type:
checkbox· Required: no · Default:falseWhen enabled, tasks with this name are processed in a dedicated queue, separate from the default ECA queue. This allows independent processing and cron management.
Cron run time (seconds)— config key:cron-
Please note: This option is only available when the Distribute option is enabled above. Leave empty to disable processing when running cron.
Type:
number· Required: no · Default: empty stringOnly available when 'distribute' is enabled. Specifies how many seconds the cron worker should spend processing tasks from this queue during each cron run. Leave empty to disable cron-based processing.