Download the PHP package kamranata/queue-sql without Composer

On this page you can find all versions of the php package kamranata/queue-sql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package queue-sql

Build Status Total Downloads Latest Stable Version License

Queue any Laravel write query — delete, update, insert — and run it across parallel batched jobs. Built for large-scale mutations without long locks.

Why

A single User::where('is_blocked', true)->delete() over millions of rows runs one giant statement: it holds a long lock, blocks the web request, strains replication, and often hits the request or worker timeout.

queue-sql turns that one statement into many small, parallel jobs. It reads the min/max primary key under your constraints, splits the key space into chunk-sized ranges, and dispatches one batched job per range. Each job re-applies your original WHERE and mutates only its own slice — so every statement is small and bounded, locks stay short, and the work runs on your queue workers instead of the request.

You keep the fluent Eloquent API you already know, and get batch progress, retries, throttling, then/catch/finally callbacks, Artisan monitoring, and Horizon tags for free.

Features

How it works

Install

Usage

Each dispatch returns Laravel's Illuminate\Bus\Batch, and its batch is named queue-sql:{operation}:{table} — e.g. queue-sql:delete:users — so runs are easy to find and filter in job_batches or Horizon:

Every job also carries Horizon tags — queue-sql, queue-sql:{operation}, and queue-sql:{operation}:{table} — so runs group and filter in the Horizon dashboard.

Monitoring (Artisan)

Progress comes straight from Laravel's batch record — no extra tracking is stored. Grab a batch id from ->dispatch() ($batch->id) or from the queue-sql:status list. --json works for both the list and a single batch; --watch refreshes only on a real terminal (piped or scheduled runs render once).

Parameters (queue(...))

Param Meaning Default
chunk rows per job 1000
maxJobs cap total jobs (auto-sizes chunk) — mutually exclusive with chunk none
tries per-job retries 1
backoff seconds between retries 0
onConnection queue connection default
onQueue queue name default
throttle max jobs/second none
delay seconds before jobs start none

Every param resolves in this order: explicit queue(...) argument → config/queue-sql.php default → built-in fallback (the Default column above). Publish the config to set your own defaults once, globally:

Note: because a null argument means "fall back to config", you cannot pass throttle: null at the call site to disable a throttle configured globally — set throttle: 0-style opt-outs are not supported for it. delay: 0 does work as an explicit per-call override.

maxJobs is opt-in and has no config default — it never competes with the configured chunk.

maxJobs — size by job count instead of chunk

When you care about "how many jobs" rather than "how many rows per job", pass maxJobs. It auto-sizes the chunk so the fan-out produces at most that many jobs:

chunk and maxJobs are mutually exclusive — passing both throws InvalidArgumentException. For range fan-out (delete/update) the cap is derived from the primary-key span (ceil(span / maxJobs)), so with sparse keys individual jobs may cover uneven row counts; the job count is still bounded. insert derives it from the row count directly.

Benchmark

A plain mass delete runs one statement that holds a lock for its entire duration; queue-sql splits it into many small statements, so the longest single lock is a fraction of that. Measure it on your own database:

In a quick local run (SQLite, 20k rows, chunk 2k) the baseline's longest lock was ~3.6× the longest lock under queue-sql. On MySQL or Postgres with millions of rows and real lock contention the gap is far larger — point the script at your database with DB_CONNECTION=mysql … to see your own numbers.

Limitations

Requirements

Laravel 10–13, PHP 8.1+. The suite runs against SQLite, MySQL, and Postgres in CI.


All versions of queue-sql with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/bus Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kamranata/queue-sql contains the following files

Loading the files please wait ...