= 4;
$worker->onWorkerStart = function ($worker) {
try {
// 为每个子进程创建独立的app()->make(\App\Services\DeviceModelService::class, ['mqttClient' => $mqttClient]); // 执行485设备定时采集数据app()->make(\App\Services\ModelReceiveService::class, ['mqttClient' => $mqttClient]); // 执行485设备收集数据()->make(\App\Services\DeviceModelService::class, ['mqttClient' => $mqttClient]); 怎么能确保里面的mqtt一定是这个进程所对应的