Download the PHP package vaibhavpandeyvpz/qatar without Composer

On this page you can find all versions of the php package vaibhavpandeyvpz/qatar. 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 qatar

Qatar (कतार)

Framework agnostic PHP library for publishing and consuming jobs using Redis and ElasticMQ/SQS backends.

Qatar: कतार (Queue)

Latest Version Build Status Downloads PHP Version

Features

Requirements

Installation

Install via Composer:

Local Development Setup

For local testing, use Docker Compose to run Redis and ElasticMQ:

This will start:

Quick Start

Creating a Job

Implementing Qatar\Job is simple:

By extending Job, you get default implementations for:

Override them as needed:

Publishing Jobs

Running Workers

API Reference

Qatar\Queue Interface

Method Description
push(string $job, array $payload, ?int $delay = null): string Add a job to the queue. Returns job ID.
pop(?int $timeout = null): ?JobPayload Retrieve next job. Optionally wait for $timeout seconds.
ack(string $id): bool Acknowledge successful completion of a job.
nack(string $id, ?int $delay = null): bool Record a failure and schedule a retry.
size(): int Get total number of pending and delayed jobs.
purge(): void Clear all jobs from the queue.

Qatar\Worker Class

The worker executes jobs from a queue. It is not final, so you can extend it to override resolveJob() for dependency injection.

WorkerOptions

Option Default Description
sleep 3 Seconds to wait when the queue is empty.
maxJobs null Max number of jobs to process before stopping.
maxTime null Max seconds to run before stopping.
memory 128 Memory limit in MB. Worker stops if exceeded.
stopOnEmpty false If true, worker quits when queue is empty.

Advanced Usage

Exponential Backoff

Implement custom backoff logic by using the attempts property in the payload:

Redis SSL/TLS Support

The RedisQueue supports secure connections over SSL/TLS. You can use the rediss:// or tls:// schemes in your connection string:

When using ext-redis, the library automatically handles the tls:// prefix requirement for secure connections.

Signal Handling

Workers gracefully stop when they receive SIGTERM or SIGINT. They finish the current job before exiting.

Monitoring

Testing

Run tests with code coverage:

License

MIT License. See LICENSE for details.

Author

Vaibhav Pandey


All versions of qatar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 vaibhavpandeyvpz/qatar contains the following files

Loading the files please wait ...