這里詳細描述問題
下面放在外面無法捕獲,直接顯示報錯信息了
try {
$config = \config('cache.stores.redis');
$client = new Client($config['type'] . '://' . $config['host'] . ':' . $config['port'], ['auth' => $config['password']]);
// 訂閱
$client->subscribe('video', function ($data) {
event('videoClip', $data);
});
} catch (\Throwable $e) {
log_error($e, '【視頻剪輯定時任務】【videoClip】', 'command_video');
}
下面放在里面正??梢圆东@并且寫入日記了
$config = \config('cache.stores.redis');
$client = new Client($config['type'] . '://' . $config['host'] . ':' . $config['port'], ['auth' => $config['password']]);
// 訂閱
$client->subscribe('video', function ($data) {
try {
event('videoClip', $data);
} catch (\Throwable $e) {
log_error($e, '【視頻剪輯定時任務】【videoClip】', 'command_video');
}
});
window10
workerman和Workerman\RedisQueue都是最新版