Download the PHP package resgen/lumen-proc without Composer

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

Lumen Process Control Drivers

Process control for running artisan commands as a deamon. Respects all sigterm commands sent. Includes TTL driver and RunOnce drivers. This should work for Laravel too, but its only been tested with lumen.

Why?

When running artisan commands as a background deamon process, the ProcessControl will ensure that SIGTERMs are respected. This is especially important when running artisan commands as the docker entrypoint. It will respect docker's kill signal and give you a chance to finish work before exiting.

Install

With composer:

Ensure pcntl_async_signals is enabled for your php install. Example docker alpine RUN:

Configuration

Add the laravel service provider Resgen\Common\Proc\ProcessControlProvider to your app.

Then add the following ENV var with the selected driver:

By default, the TTL drivers will log an INFO heart beat every ~5 seconds. You can also disable the heart beat log by doing:

You may enable SignalException to be thrown asynchronously when a signal is processed, this will happen from wherever your normal code is being executed and gives you a chance to clean things up gracefully while still responding immediately to signals (or ignore them if appropriate.)

Available Drivers

TtlProcessDriver

ENV name: ttl.

Runs for N number of seconds. Defaults to 300s runtime. Logs a heart beat message every ~6 seconds. You can adjust the runtime by setting the LUMEN_PROC_TTL=1000s. Will exit if a SIGTERM is sent. Intended to be used with a process supervisor like runit, supervisord or inside a docker orchestration env like kubernetes.

TtlInstantKillProcessDriver

ENV name: ttl_hardexit.

Same as TtlProcessDriver, but throws exception as soon as signal is recieved.

KeepAliveProcessDriver

ENV name: keepalive.

Runs until a SIGTERM signal is sent. Not recommended for production usage. Processes should cycle.

RunOnceProcessDriver

ENV name: runonce.

Will escape immediately when check() is called.

Example Usage

Cron Calls

LoopingCommand automatically enables internal cron calls of functions to occur at regular intervals. This check happens each time loop() returns control or while the command is sleeping.

Example Usage


All versions of lumen-proc with dependencies

PHP Build Version
Package Version
Requires laravel/lumen-framework Version >=5.8
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 resgen/lumen-proc contains the following files

Loading the files please wait ....