Download the PHP package jellelampaert/ci4_queue without Composer

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

CodeIgniter4 queuing system

Queue tasks that depend on external services (like e-mail) in the database. Process the queue asynchronous (i.e. by using a cronjob), so the user does not have to wait for that service to respond.

Installation

Install the package through Composer.

Run the Composer require command from the Terminal:

composer require jellelampaert/ci4_queue

Once installed, make sure your database is setup correctly and run the migration

php spark migrate -all

Usage

How to load the library

The queuing system has the following methods:

Queue::queue($queue)

Define the queue you want to use. Your application can have different queues, i.e. a queue for e-mails, a queue for webhooks, ...

Queue::add($data)

Add a task to the queue. The argument can be anything: a number, a string, an array, an object, ... Make sure to define a queuename first

Queue::clean($hours)

Delete all tasks from a queue that are processed more than x hours ago.

Queue::cleanAll($hours)

Delete all tasks from all queues that are processed more than x hours ago.

Queue::delete($id)

Delete a task from the database.

Queue::getAllTasks()

Gets all tasks in the queue, whether they are processed or not

Queue::getAllUnprocessed()

Gets all unprocessed tasks from every queue in the database.

Queue::getTask($id)

Gets a task by it's ID

Queue::getUnprocessed()

Get all unprocessed tasks from a queue.

Queue::setProcessed($id)

Sets a task as processed.

Queue::setResponse($id, $data)

Sets the response of a task. This can be used for logging purposes or debugging

License

This package is free software distributed under the terms of the MIT license.


All versions of ci4_queue with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
codeigniter4/framework Version ^4.1
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 jellelampaert/ci4_queue contains the following files

Loading the files please wait ....