Download the PHP package underpin/background-process-loader without Composer

On this page you can find all versions of the php package underpin/background-process-loader. 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 background-process-loader

Underpin Background_Processes Extension

Background Processing Integration for the Underpin WordPress framework.

As originally described by Delicious Brains:

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks. Check out the example plugin or read the accompanying article.

Benefits of using this inside Underpin:

  1. Everything works inside of Underpin's registry, which works quite well with how Background Processing works.
  2. Underpin extends Background Processing to use Underpin's event logging.

Installation

Using Composer

composer require underpin/background-process-loader

Manually

This plugin uses a built-in autoloader, so as long as Background Processing is required before this extension, it should work as-expected.

require_once(__DIR__ . '/underpin-background-processes/underpin-background-process.php');

Setup

  1. Install this loader.
  2. Install Underpin. See Underpin Docs
  3. Create Background_Process or Async_Request classes.
  4. Register processes using Underpin.

Working With Async Tasks

From Delicious Brains:

Async requests are useful for pushing slow one-off tasks such as sending emails to a background process. Once the request has been dispatched it will process in the background instantly.

Alternatively, you can extend Async_Request and reference the extended class directly, like so:

Once registered, you can run the action any time like so:

Working With Background Processes

From Delicious Brains:

Background processes work in a similar fashion to async requests but they allow you to queue tasks. Items pushed onto the queue will be processed in the background once the queue has been dispatched. Queues will also scale based on available server resources, so higher end servers will process more items per batch. Once a batch has completed the next batch will start instantly.

Health checks run by default every 5 minutes to ensure the queue is running when queued items exist. If the queue has failed it will be restarted.

Queues work on a first in first out basis, which allows additional items to be pushed to the queue even if it’s already processing.

You can register a background process directly just like any other loader, like so:

task_action_callback should contain any logic to perform on the queued item. Return false to remove the item from the queue or return $item to push it back onto the queue for further processing. If the item has been modified and is pushed back onto the queue the current state will be saved before the batch is exited.

Alternatively, you can extend Background_Process and reference the extended class directly, like so:

Once registered, you can add as many items as necessary to the queue:

Finally, when you're done enqueueing items, you can dispatch the processor to run the process on each enqueued item:


All versions of background-process-loader with dependencies

PHP Build Version
Package Version
Requires deliciousbrains/wp-background-processing Version ^1.0
underpin/underpin Version ^2.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 underpin/background-process-loader contains the following files

Loading the files please wait ....