-
Notifications
You must be signed in to change notification settings - Fork 306
Swoole: Follow symlinks to enable zero-downtime deployment #1009
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
Conversation
Hello! Are you able to update this PR to follow Laravel's code style conventions? |
@taylorotwell Hello! Done. Added the necessary PHPDoc and verified the code with Laravel Pint using I've no idea why the Roadrunner tests on the cloud are failing randomly. They are not related at all. Most likely caused by #1008 |
Thanks for your pull request to Laravel! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include. If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions! |
Issue is addressed in #1004. This PR fixes the addressed issue.
What does this PR do?
SCRIPT_NAME
contains the base directory and it differs frombasePath
, it replaces realpath paths with symlinked paths.swoole-server
using the environment parameterAPP_RELEASE_BIN_DIR
.swoole-server
usesAPP_RELEASE_BIN_DIR
instead of the PHP realpath__DIR__
.swoole-server
listens to the Swoole eventbeforereload
. Whenever the app is reloaded, it clears the PHP directory caches usingclearstatcache(true)
.