oxygenzsas / composer_lib_app
我框架的启动类
0.3.43
2024-04-05 08:01 UTC
Requires
README
我框架的启动类
迁移
CONFIG
// Migration "Migration" => [ /** migration de l'app principal */ 'App' => ['path' => realpath($root_dir.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'migration'.DIRECTORY_SEPARATOR), 'name' => 'App'] ,'Trad' => ['path' => realpath($root_dir.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'trad'.DIRECTORY_SEPARATOR), 'name' => 'Trad'] ],
migration INIT (安装数据库迁移)
composer migration source=App action=init
migration UP (全部)
composer migration source=App action=upgrade
migration DOWN (逐个)
composer migration source=App action=downgrade
工作进程
CONFIG
// Supervisor "Supervisor" => [ /** chemin vers l'executable php */ 'php_path' => 'C:\Users\...\PHP\php-8.1.3-nts-Win32-vs16-x64\php.exe' ,'lock_path' => realpath($root_dir).DIRECTORY_SEPARATOR.'lock'.DIRECTORY_SEPARATOR ],
CONFIG-WORKER 在config文件夹内名为worker.php的文件。列出所有活动工作进程
<?php /** * retourne la liste des workers actifs */ return [ (new \App\worker\Worker1())->getTagIdentifier() => \App\worker\Worker1::class ];
supervisor all (启动所有工作进程)
composer supervisor action=all
仅启动名为worker_1的工作进程
composer supervisor action=start worker=worker_1
终止名为worker_1的工作进程
composer supervisor action=kill worker=worker_1