Download the PHP package oat-sa/extension-tao-task-queue without Composer

On this page you can find all versions of the php package oat-sa/extension-tao-task-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 extension-tao-task-queue

Distributed Task Queue

codecov

This article describes the functioning of an ASYNC Task Queue.

Install

You can add the Task Queue as a standard TAO extension to your current TAO instance.

Queue component

Queue can work with different types of queue brokers, here two types are to accomplish ASYNC mechanism:

Note:

When SqsQueueBroker is used, please make sure that "oat-sa/lib-generis-aws" is included in the main composer.json and you have generis/awsClient.conf.php properly configured.

Weight

A Queue can have a weight. If multiple Queues are in use, this weight will be used for randomly select a Queue to be consumed. For example, if QueueA has weight of 1 and QueueB has weight of 2, then QueueB has about a 66% chance of being selected.

Worker component

Here we have a so called LongRunningWorker which can run unlimited time. It has built-in signal handling for the following actions:

Note:

Multiple workers can be run at the same time.

After processing the given task, the worker saves the generated report for the task through the Task Log.

Service setup examples

Multiple Queues settings

In this case we have 3 Queues registered: one of them is using SQS broker, the other two RDS. Every Queue has its own weight (like 90, 30, 10) which will be used at selecting the next queue to be consumed.

And we have two tasks linked to different queues, furthermore the default queue is specified ('background') what will be used for every other tasks not defined in OPTION_TASK_TO_QUEUE_ASSOCIATIONS.

If the queue has not been initialized, meaning the required queue container has not been created yet:

Initializing the queues and the task log container

You can run this script if you want to be sure that the required queues and the task log container are created.

Note:

This script also can be used to change the current queues to use a different queue broker.

Running a worker

To run a worker, use the following command. It will start a worker for running infinitely and iterating over every registered Queues based in their weights.

If you want the worker running for a dedicated Queue, pass the name of the queue to the command like this:

You can limit the iteration of the worker. It can be used only on a dedicated queue.

If you want to associate specyfic task to new queue you can use this command:

Next time when defined task will be created, it will be assign to specified queue.

Summarize stuck tasks

Execute this command if you want to summarize stuck tasks. Example:

Restart stuck tasks

Execute this command if you want to restart stuck tasks. Example:

Rest API

The task log reports can be viewed/consume using the Application Programming Interface (API). In order to use it please check the swagger file in (doc/taskApi.yml).

Command Line Utility

Besides using the API to check reports of tasks, another way it's using the command line.

This command will show you all the possibilities action the the utility can have.


All versions of extension-tao-task-queue with dependencies

PHP Build Version
Package Version
Requires oat-sa/oatbox-extension-installer Version ~1.1||dev-master
react/child-process Version ^0.5.2
evenement/evenement Version ^2.0
ext-pdo Version *
oat-sa/generis Version >=15.22
oat-sa/tao-core Version >=53.6.0||53.3.3
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 oat-sa/extension-tao-task-queue contains the following files

Loading the files please wait ....