Skip to content

The uniqueness of the queue #543

@garryseldon

Description

@garryseldon

I'd like to be able to pass a string. If such a string exists, the job won't be created. Example: An online store sends a customer an email about a change to an order. The manager changes the order status, items, delivery time, and so on within a minute. It should be one email, not three.

Yii::$app->queue->delay(5 * 60)->name('email_' . $orderId)->push(new EmailJob([
    'order_id' => $orderId,
]));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions