Skip to main content

list_delivery_targets

Function list_delivery_targets 

Source
pub async fn list_delivery_targets(
    pool: &Pool,
    parent: &str,
    keys: &[String],
) -> Result<Vec<DeliveryTarget>, Error>
Expand description

Enumerate every delivery target with pending queue rows in the subtree rooted at parent:

  • Hierarchies (subtree-inclusive): direct rows, plus tag rows resolved through a BOUND tag.
  • Un-upgraded (GROUPED) tags whose tag_groups parent sits in the subtree (inclusive — the minted hierarchy will be a strict descendant of that parent).

ABSENT tag rows (no tags row at all) are filtered out at the SQL level — there is nothing to wake or materialize for them.

keys, when non-empty, restricts the result to targets that have an active pending row whose key is one of keys. Empty keys applies no key filter (every pending target is returned). A row with a NULL key only matches when keys is empty.