yiisoft / yiisoft/yii2-queue

FR: Process jobs in batches

Open
#161 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:under discussion type:feature
Dominant language
PHP
Stars
1.1k
Forks
285
Avg merge
5d 3h
Merged PRs (30d)
2

Description

I'd like to use this extension to handle mail queue, but because each job is processed separately, this becomes really slow if I send emails by SMTP (each job negotiates its own connection). Can we introduce something like BatchJobInterface that will allow executing multiple jobs at once? There are many situations when batch processing may improve performance a lot.

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 by examining the extension’s current per-job execution flow and how its supported queue drivers handle jobs. Use the proposed BatchJobInterface and the mail-queue/SMTP use case to define what batch execution should cover, then verify that multiple jobs can share processing without a separate connection for each 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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.