Download the PHP package ravisorg/exec-parallel without Composer

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

ExecParallel

Description

A CLI job queue for running multiple commands in parallel. Add jobs on the fly and use event callbacks to get notified when processes start/write to stdout/stderr/complete/etc.

Mini Project Disclaimer

This is a mini-project, for my own use, and as such may not contain all the proper setters/getters/validation/testing that you would normally expect from production ready code. You may find it useful, however I don't consider it robust enough to recommend to the general public. Fixes / pull requests are always welcome.

Example

1. Create and configure the controller object

2. Create, configure, and add one or more jobs to the queue

Repeat as needed:

3. Start the queue and wait until complete

Finally you want to start the jobs and wait until they're complete. There are a couple ways you can do this. If you just want to wait until everything is done and not do anything else in the meantime, you can call waitUntilComplete.

Alternatively you can continue doing other things in the meantime, occasionally calling process to check in on the running jobs and fire events as needed, which will return false once all jobs are complete.

Controller Object

Properties

Accessed via (eg) $jobControl->startTime.

startTime

The Unix timestamp of when the first job started, or NULL if nothing has started yet.

completeTime

The Unix timestamp of when the last job completed, or NULL if nothing has started yet, or jobs are still running.

runTime

The number of seconds jobs were running for (completeTime - startTime), or NULL if completeTime isn't set.

Events

Register events with (eg) $jobControl->on('event',callable). Your callable function should accept a Controller object as it's first parameter, and optionally other parameters for specific events.

start

Called just before the first job is started, and before the first job's start event.

complete

Called after the last job is completed, and after the last job's complete event.

Job Object

Job properties

Accessed via (eg) $job->startTime.

stdout

Everything this command wrote to stdout. Available while the job is running, however cannot be considered "complete" until the job is completed (the command may continue to write to stdout, which will be added to this as it does).

stderr

Everything this command wrote to stderr. Available while the job is running, however cannot be considered "complete" until the job is completed (the command may continue to write to stderr, which will be added to this as it does).

returnCode

The exit / return code of the command. NULL until the job is complete.

startTime

A Unix timestamp of the time the command was started (eg: use with date), or NULL if the job hasn't started yet.

$job->completeTime

A Unix timestamp of the time the command completed (eg: use with date), or NULL if the job hasn't completed yet.

$job->runTime

The number of seconds the command was running for. NULL if completeTime isn't set.

Events

Register events with $job->on('event',callable). Your callable function should accept a Job object as it's first parameter, and optionally other parameters for specific events.

start

Called just after the command is executed.

complete

Called just after the job's command has completed. Second parameter will be the exit/return code from the command.

stdout

Called when the job's command writes to stdout (standard output). Second parameter will be a string with the output that triggered the event.

stderr

Called when the job's command writes to stderr (error output). Second parameter will be a string with the output that triggered the event.

License

ExecParallel is licensed under the Modified BSD License (aka the 3 Clause BSD). Basically you can use it for any purpose, including commercial, so long as you leave the copyright notice intact and don't use my name or the names of any other contributors to promote products derived from ExecParallel.

Copyright (c) 2012, ravisorg
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the Travis Richardson nor the names of its 
      contributors may be used to endorse or promote products derived 
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL TRAVIS RICHARDSON BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

All versions of exec-parallel with dependencies

PHP Build Version
Package Version
No informations.
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 ravisorg/exec-parallel contains the following files

Loading the files please wait ....