Module notifier_pool

One worker_pool per provider (notifier_fcm_pool, notifier_apns_pool) that performs deliveries off the caller's process.

Description

One worker_pool per provider (notifier_fcm_pool, notifier_apns_pool) that performs deliveries off the caller's process.

Why pools: an AMQP channel is sequential and an HTTP handler should answer 202 fast; a provider round-trip takes ~100 ms. Casting to a pool lets the caller move on while N workers do the slow HTTP calls in parallel. Separate pools mean an APNs outage cannot starve FCM deliveries and vice versa.

Function Index

enqueue/2Queue one delivery; returns immediately.
pool_name/1
start/0Start both pools (idempotent).

Function Details

enqueue/2

enqueue(Event::notifier_event:event(), Target::notifier_event:target()) -> ok

Queue one delivery; returns immediately.

pool_name/1

pool_name(X1::notifier_event:provider()) -> atom()

start/0

start() -> ok

Start both pools (idempotent).


Generated by EDoc