-
Notifications
You must be signed in to change notification settings - Fork 98
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
Remove puma and fork a subprocess #43
Conversation
@jkeiser I don't know why Pedant is failing - it passes locally.
|
Loss of the --socket option makes me sad, but understand the tradeoff. Won't the use of fork() cause problems on windows as well? |
@stevendanna yea, but I think the And sigh. Fork may have been a bad decision as well (although the current use of threads also has some problems WRT to starting and stopping the server process). I wonder if we could use |
uri = URI.join(url, 'cookbooks') | ||
headers = { 'Accept' => 'application/json' } | ||
|
||
timeout(0.1) { !open(uri, headers).nil? } |
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.
Can you preface this with if server.status != :Running false, so that we only spend the 0.1 seconds when it's lying to us? This method should be cheap most of the time.
This commit removes all instances of the Puma webserver, since it has known issues on a number of supported platforms and adds significant branching logic to the code. This commit also re-defines what it means when the server is "running". In the past, "running" has meant the web server is up. Testing has revealed that web servers actually lie and say they are running, even if they are not accepting requests. The new `running?` method uses OpenURI to access a known URL on the server. WEBrick does not support running on a socket, so the `--socket` option has also been removed.
👍 assuming this passes puma locally! |
er. passes tests locally. Calling Freud. |
This commit removes all instances of the Puma webserver, since it has known issues on a number of supported platforms and adds significant branching logic to the code.
This commit also re-defines what it means when the server is "running". In the past, "running" has meant the web server is up. Testing has revealed that web servers actually lie and say they are running, even if they are not accepting requests. The new
running?
method uses OpenURI to access a known URL on the server.WEBrick does not support running on a socket, so the
--socket
option has also been removed.