-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(core): implement core.sleep
#2397
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for minor code style
Is there a long sleep in the project? |
This change seems to be of little use to the current code |
Among the current code, it really only work better when the worker process being shut down at the time of triggering request limiting and delaying processing. And we can keep it as a better way to sleep for the future usage scenarios. |
I think this feature is useful. When the APISIX instance restarts, we need to exit |
@dabue many thx |
fix #2170
Use a small time interval (such as 1s) to complete a relatively long sleep behavior, so that the worker process can be shut down gracefully.