使用webman命令行執(zhí)行
php webman test
這個test腳本查詢?nèi)罩荆缓笸平o隊列,但是執(zhí)行過程中報錯
Timer can only be used in workerman running environment
use Webman\RedisQueue\Client
RedisQueue::send('xxx',$data);
報錯信息:
In Timer.php line 157:
Timer can only be used in workerman running environment
test
win11
php8.3
升級完最新版
還是不行
手冊里有說
Client::send()是異步的,它只能在workerman的運行環(huán)境中使用,命令行腳本請使用同步接口Redis::send()