首先,祝所有程序員節(jié)日快樂(lè)。
我們的架構(gòu)是這樣的:
用戶下單,產(chǎn)生隊(duì)列
利用workerman的定時(shí)任務(wù)監(jiān)控隊(duì)列(40個(gè)進(jìn)程 每秒執(zhí)行一次)
定時(shí)任務(wù)里處理訂單邏輯完成下單,向app發(fā)送通知
我的問(wèn)題是會(huì)不會(huì)有多個(gè)進(jìn)程同時(shí)拿到一個(gè)隊(duì)列任務(wù)的情況。
另外,我在php start stop的時(shí)候產(chǎn)生了exit with status 9的錯(cuò)誤
2017-10-24 13:29:17 pid:20771 Workerman stop
2017-10-24 13:29:17 pid:20771 Workerman is stoping ...
2017-10-24 13:29:17 pid:18710 Workerman Stopping ...
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 worker exit with status 9
2017-10-24 13:29:19 pid:18710 Workerman has been stopped
2017-10-24 13:29:19 pid:20771 Workerman stop success
我不知道是不是因?yàn)槲易约簶I(yè)務(wù)邏輯的問(wèn)題導(dǎo)致阻塞,請(qǐng)不吝賜教
對(duì)了,還有一個(gè)問(wèn)題,workerman 定時(shí)器也推薦使用 Workerman\Protocols\Http::end() 這個(gè)方法來(lái)結(jié)束當(dāng)前的任務(wù)嗎?