Download the PHP package cesurapp/swoole-bundle without Composer
On this page you can find all versions of the php package cesurapp/swoole-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cesurapp/swoole-bundle
More information about cesurapp/swoole-bundle
Files in cesurapp/swoole-bundle
Package swoole-bundle
Short Description Symfony Swoole Bundle
License MIT
Homepage https://github.com/cesurapp/swoole-bundle
Informations about the package swoole-bundle
Symfony Swoole Bundle
Built-in Swoole http server, background jobs (Task), scheduled task (Cron) worker are available. Failed jobs are saved in the database to be retried. Each server has built-in background task worker. Scheduled tasks run simultaneously on all servers. It is not possible for tasks to run at the same time as locking is used.
Install
Required Symfony 7
Edit: public/index.php
Configuration:
Server Environment: .env
Server Commands
Create Cron Job
You can use cron expression for scheduled tasks, or you can use predefined expressions.
*/ class ExampleJob extends \Cesurapp\SwooleBundle\Cron\AbstractCronJob { /**
-
@see AbstractCronJob */ public string $TIME = '@EveryMinute10';
/**
-
Cron is Enable|Disable. */ public bool $ENABLE = true;
/**
-
Cron Context */ public function __invoke(): void {
} }
Create Task (Background Job or Queue)
Data passed to jobs must be of type string, int, bool, array, objects cannot be serialized.
Create:
Handle Task:
All versions of swoole-bundle with dependencies
ext-swoole Version *
symfony/dependency-injection Version ^7.1
symfony/http-kernel Version ^7.1
symfony/framework-bundle Version ^7.1
symfony/runtime Version ^7.1
symfony/console Version ^7.1
dragonmantank/cron-expression Version ^3.3
symfony/lock Version ^7.1
symfony/dotenv Version ^7.1
symfony/http-client-contracts Version ^3.5