hyperf / hyperf

🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

Home Page:https://www.hyperf.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] 重启服务的时候,如何确保crontab进程/queue进程不会执行到一半被强行终止

luoyou opened this issue · comments

commented

Before you submit an issue, please be sure to search through existing issues as well as search through the documentation

  • I've searched all existing issues
  • I've read all relevant documentation I could find

Describe your question

https://wiki.swoole.com/zh-cn/#/question/use?id=swoole%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e7%9a%84%e9%87%8d%e5%90%af%e6%9c%8d%e5%8a%a1

看了官方文档,这两个参数是不是在server.php文件中进行配置,在server中配置,对crontab和queue生效吗?

生效。

不过需要你使用的是异步服务。

commented

如果采用柔性重启,是不是必须采用kill -USR1 471045 这种模式重启,测试过了,采用这种模式重启没办法重载修改后的代码。

用supervisorctl restart hyperf能够柔性重启吗?

commented

如果采用柔性重启,是不是必须采用kill -USR1 471045 这种模式重启,测试过了,采用这种模式重启没办法重载修改后的代码。

用supervisorctl restart hyperf能够柔性重启吗?

经过测试,supervisorctl restart hyperf支持平滑重启