yiisoft / yiisoft/yii2-queue

The uniqueness of the queue

Open
#543 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.1k
Forks
285
Avg merge
5d 3h
Merged PRs (30d)
2

Description

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,
]));

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the Yii::$app->queue->delay()->name()->push() entry point and review how queue uniqueness could apply across the supported queue backends. Define the behavior for an existing name and verify that repeated order-status changes result in only one queued email job.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.