Giter VIP home page Giter VIP logo

queue-system-php's Introduction

Light Task Queues System PHP

Lightweight queue system that performs work in the background, with a central agent that is responsible for executing and managing processes.

You can configure the number of processes in parallel to process, and the time from which the system can process the task.

Configure

Database

The database must be configured in the file class.queue.php

CLI php

You must configure the PHP binary file path in class.queue.php

/*
		PHP_CLI
		Example
			cPanel: '/usr/bin/php'
			xampp Windows: 'C:\xampp\php\php.exe'
			vestacp: 'php'
*/
private $php_cli = 'php';

Maximum processes in parallel

You must configure the maximum number of processes in parallel in class.queue.php

/*
	Maximum processes in parallel
*/
	
public $max_process = 10;

Cronjob

Add cron with execute PHP cron.dispatcher.php every five minutes.

*/5 * * * * /usr/bin/php /home/username/public_html/cron.dispatcher.php >/dev/null 2>&1

Interesting

If you want a more advanced system, you may be interested in this other system called beanstalkd https://beanstalkd.github.io/

Sistema liviano de colas PHP

Sistema de colas liviano que realiza el trabajo en segundo plano, con un agente central que se encarga de ejecutar y administrar los procesos.

Se puede configurar la cantidad de procesos en paralelo a procesar, y el horario desde el cual el sistema puede procesar la tarea.

Configuracion

Base de datos

Se debe configurar la base de datos en el archivo class.queue.php

CLI php

Se debe configurar la ruta del archivo binario de PHP en class.queue.php

/*
		PHP_CLI
		Example
			cPanel: '/usr/bin/php'
			xampp Windows: 'C:\xampp\php\php.exe'
			vestacp: 'php'
*/
private $php_cli = 'php';

Cantidad máxima de procesos en paralelo

Se debe configurar la cantidad máxima de procesos en paralelos en class.queue.php

/*
	Maximum processes in parallel
*/
	
public $max_process = 10;

Cronjob

Agregar un cronjob para ejecutar el archivo cron.dispatcher.php cada cinco minutos

*/5 * * * * /usr/bin/php /home/username/public_html/cron.dispatcher.php >/dev/null 2>&1

Interesante

Si desea un sistema mas avanzado, puede ser de tu interes beanstalkd https://beanstalkd.github.io/

queue-system-php's People

Contributors

marcofbb avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.