Download the PHP package laravel-addons/command-daemonizer without Composer

On this page you can find all versions of the php package laravel-addons/command-daemonizer. 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 command-daemonizer

Laravel Command Daemonizer

Run a Laravel console command as a long-lived process with gracefully shutdown.

Installation

Laravel will automatically add the service provider CommandDaemonizerServiceProvider to the file config/app.php in providers option.

In Lumen, you MUST manually register the service provider CommandDaemonizerServiceProvider in bootstrap/app.php file:

How to use

For example, run kafka consumer

  1. You MUST implement method daemon(). This method will run in an endless loop.
  2. You can use constructor to inject your dependency or inject dependency in daemon() method. Your dependencies will be resolved.
  3. You can override the empty parent method init() to run some code before starting the daemon.

Options

DaemonCommand append some options to you command:

Gracefully shutdown

Since daemonized commands are long-lived processes, they will not pick up changes to your code without being restarted. So, the simplest way to deploy an application using daemonized commands is to restart the commands during your deployment process. You may gracefully restart all of the daemonized commands by issuing the daemon-command:restart:

This command will instruct all daemonized commands to gracefully "die" after they finish processing their current step in loop. Since the daemonized commands will die when the daemon-command:restart command is executed, you should be running a process manager such as Supervisor to automatically restart the daemonized commands.

This library uses the cache to store restart signals, so you should verify a cache driver is properly configured for your application before using this feature.

Based on Illuminate Queue Worker.


All versions of command-daemonizer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
illuminate/console Version ^5.0|^6.0|^7.0
illuminate/support Version ^5.0|^6.0|^7.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 laravel-addons/command-daemonizer contains the following files

Loading the files please wait ....