改进 队列
This commit is contained in:
parent
385c6596f0
commit
f60cc898c1
@ -1,10 +1,14 @@
|
||||
# LaeCloud 莱云
|
||||
|
||||
### 扣费队列
|
||||
1. default 默认扣费队列
|
||||
2. host-cost 机器扣费队列
|
||||
|
||||
### 主节点运行
|
||||
```bash
|
||||
docker run -itd --name=lae_schedule --init --restart=always --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte art schedule:work
|
||||
|
||||
docker run -itd --name=lae_workers --init --restart=always --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte art queue:work
|
||||
docker run -itd --name=lae_workers --init --restart=always --net=host -v /opt/lae:/opt/lae ccr.ccs.tencentyun.com/laecloud/cafe:latte art queue:work --queue=default,host-cost
|
||||
```
|
||||
|
||||
### Web 节点运行
|
||||
|
@ -40,7 +40,7 @@ public function handle(): void
|
||||
|
||||
$host->whereIn('status', ['running', 'stopped'])->with('user')->chunk(500, function ($hosts) {
|
||||
foreach ($hosts as $host) {
|
||||
dispatch(new RealHostCostJob($host, $host->getPrice()));
|
||||
dispatch(new RealHostCostJob($host, $host->getPrice()))->onQueue('host-cost');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user