jdaugherty commented on code in PR #15698:
URL: https://github.com/apache/grails-core/pull/15698#discussion_r3424611857
##########
grails-doc/src/en/ref/Command Line/stop-app.adoc:
##########
@@ -25,30 +25,34 @@ under the License.
=== Purpose
-Stops a running Grails application in an embedded servlet container.
+Stops a Grails application that was started with the
link:{commandLineRef}run-app.html[run-app] command.
-NOTE: This command will work in development mode only.
+NOTE: This command works in development mode only.
=== Examples
[source,groovy]
----
-grails stop-app
-grails stop-app --port=9090 --host=mywebsite
+$ grails
+grails> run-app
+grails> stop-app
----
+It can also be run as a separate invocation, including from a different
terminal than the one that started the application:
-=== Description
+[source,bash]
+----
+$ grails stop-app
+----
-Arguments:
+=== Description
+
-* `port` - Specifies the port which the Grails application is running on
(defaults to 8080 for HTTP or 8443 for HTTPS)
-* `host` - Specifies the host the Grails application is bound to
+Use `stop-app` to stop the application for the current project after it has
been started with `run-app`. The command can be run from interactive mode or as
a separate command from another terminal.
Review Comment:
Shouldn't this be an upgrade note and not mentioned here?
##########
grails-profiles/base/commands/run-app.groovy:
##########
@@ -125,6 +144,12 @@ catch(org.gradle.tooling.BuildCancelledException e) {
return true
}
catch(Throwable e) {
+ // A deliberate stop-app terminates the bootRun process, which surfaces
here as a build
+ // failure; report it as a clean shutdown rather than a startup failure.
+
if(org.grails.cli.gradle.RunningApplicationProcess.isStopRequested(buildDir)) {
Review Comment:
The TERM is critical here - stop app was always a graceful shutdown so
shutdown hooks get called.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]