Skip to main content

JobPaces

\Benecaster\Email\Warmup\JobPaces

Class Free

Records which bulk job groups have asked to be sent more slowly. A pace belongs to a job group (related_id plus email type), not to a single message, so a whole send runs at one speed. When a tick picks up rows from several groups, the slowest pace among them applies. Entries are removed when the group completes. Get it from the container.

Methods

Method Visibility Since Description
set( int $related_id, string $type, SendingPace $pace ): void Public — Asks for a job group to be sent at a pace. Setting Standard removes the entry.
for_job( int $related_id, string $type ): SendingPace Public — The pace a job group asked for; Standard when none.
slowest_for_rows( array $rows ): SendingPace Public — The slowest pace asked for by any job group among queue rows. Used by the email queue.