abc / job-server-bundle
A symfony bundle to manage asynchronous distributed processing of stateful jobs
Installs: 994
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.2
- abc/job: ^0.4|dev-master
- psr/log: ^1.0
- symfony/framework-bundle: ^4.3|^5.1
Requires (Dev)
- aboutcoders/scheduler-bundle: 2.x-dev
- dama/doctrine-test-bundle: ^6.2
- doctrine/doctrine-bundle: ~1.2|^2
- doctrine/orm: ^2.7
- doctrine/persistence: ^1.3
- enqueue/enqueue-bundle: ^0.10
- enqueue/null: ^0.10
- phpunit/phpunit: ^8.0|^9.0
- symfony/browser-kit: ^4.3|^5.1
- symfony/yaml: ^4.3|^5.1
This package is not auto-updated.
Last update: 2024-11-13 14:05:36 UTC
README
A symfony bundle for asynchronous distributed job processing using php-enqueue as transport layer.
Note: This project is still experimental!
Features
- Asynchronous distributed processing of
- Job: a single job
- Batch: multiple jobs that are processed in parallel
- Sequence: multiple jobs processed in sequential order
- Free composition of Job, Sequence, and Batch
- Status information about jobs
- Cancellation and restarting of jobs
- Cron jobs (requires AbcSchedulerBundle 2.x)
- JSON REST-Api & PHP client library
- OpenApi documentation
Demo
You can find a demo here.
Installation
composer install abc/job-server-bundle
Getting Started
Prerequisites
- EnqueueBundle is configured with a transport layer
Steps
-
In case you configured a transport with a key different that
default
you have to configure this transport also for the AbcJobServerBundleabc_job_server: transport: my_transport_name
-
Create database and database schema
bin/console doctrine:database:create bin/console doctrine:schema:create
-
Start the command that processes replies from workers
bin/console abc:process:reply someReplyQueue
-
Create an application that will consume jobs using the AbcJobWorkerBundle that will process jobs.
Configuration Reference
abc_job_server: # the enqueue transport name transport: default # whether to enable the cronjob component cronjob: enabled: true # whether to enable the endpoints to cleanup jobs, and cronjobs cleanup: enabled: true
Commands
Command abc:broker:setup
The command abc:broker:setup
declares queues at the broker for all registered routes.
bin/console abc:broker:setup --help
Command abc:reply:process
The command abc:reply:process
processes job replies from queues, updates job information and schedules dependant jobs
bin/console abc:reply:process --help
License
The MIT License (MIT). Please see License File for more information.