Permalink
Browse files

if reloading is disabled, also disable the project watcher

  • Loading branch information...
1 parent baee26a commit 750524bc03b220b4e2632549777031f507166e9f @danveloper danveloper committed Aug 29, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 scripts/_GrailsRun.groovy
@@ -47,6 +47,9 @@ grailsContext = null
recompileFrequency = System.getProperty("recompile.frequency")
recompileFrequency = recompileFrequency ? recompileFrequency.toInteger() : 3
+// Should the reloading agent be enabled?
+isReloading = Boolean.getBoolean("grails.reload.enabled")
+
shouldPackageTemplates = true
// This isn't used within this script but may come in handy for scripts
@@ -90,8 +93,10 @@ target(startPluginScanner: "Starts the plugin manager's scanner that detects cha
return
}
- projectWatcher = new GrailsProjectWatcher(projectCompiler, pluginManager)
- projectWatcher.start()
+ if (isReloading) {
+ projectWatcher = new GrailsProjectWatcher(projectCompiler, pluginManager)
+ projectWatcher.start()
+ }
}
target(stopPluginScanner: "Stops the plugin manager's scanner that detects changes to artifacts.") {

0 comments on commit 750524b

Please sign in to comment.