summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/rr/cmd/root.go2
-rw-r--r--cmd/rr/cmd/stop.go2
-rw-r--r--cmd/rr/http/debug.go4
-rw-r--r--cmd/rr/http/metrics.go2
-rw-r--r--cmd/rr/http/reset.go4
-rw-r--r--cmd/rr/http/workers.go4
-rw-r--r--cmd/rr/limit/debug.go4
-rw-r--r--cmd/rr/limit/metrics.go2
-rw-r--r--cmd/rr/main.go6
-rw-r--r--service/reload/watcher.go7
10 files changed, 20 insertions, 17 deletions
diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go
index 456cfc6a..a1b1d642 100644
--- a/cmd/rr/cmd/root.go
+++ b/cmd/rr/cmd/root.go
@@ -23,9 +23,9 @@ package cmd
import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
- "github.com/spiral/roadrunner/cmd/util"
"github.com/spiral/roadrunner/service"
"github.com/spiral/roadrunner/service/limit"
+ "github.com/spiral/roadrunner/service/reload/cmd/util"
"log"
"net/http"
"net/http/pprof"
diff --git a/cmd/rr/cmd/stop.go b/cmd/rr/cmd/stop.go
index 7b4794e7..36f28c6d 100644
--- a/cmd/rr/cmd/stop.go
+++ b/cmd/rr/cmd/stop.go
@@ -22,7 +22,7 @@ package cmd
import (
"github.com/spf13/cobra"
- "github.com/spiral/roadrunner/cmd/util"
+ "github.com/spiral/roadrunner/service/reload/cmd/util"
)
func init() {
diff --git a/cmd/rr/http/debug.go b/cmd/rr/http/debug.go
index ae383e8d..5dfbedc3 100644
--- a/cmd/rr/http/debug.go
+++ b/cmd/rr/http/debug.go
@@ -5,9 +5,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spiral/roadrunner"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/cmd/util"
rrhttp "github.com/spiral/roadrunner/service/http"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
+ "github.com/spiral/roadrunner/service/reload/cmd/util"
"net"
"net/http"
"strings"
diff --git a/cmd/rr/http/metrics.go b/cmd/rr/http/metrics.go
index 21bbbaf1..df093921 100644
--- a/cmd/rr/http/metrics.go
+++ b/cmd/rr/http/metrics.go
@@ -3,9 +3,9 @@ package http
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cobra"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
rrhttp "github.com/spiral/roadrunner/service/http"
"github.com/spiral/roadrunner/service/metrics"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
"github.com/spiral/roadrunner/util"
"strconv"
"time"
diff --git a/cmd/rr/http/reset.go b/cmd/rr/http/reset.go
index 3008848a..d5c45338 100644
--- a/cmd/rr/http/reset.go
+++ b/cmd/rr/http/reset.go
@@ -22,8 +22,8 @@ package http
import (
"github.com/spf13/cobra"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/cmd/util"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
+ "github.com/spiral/roadrunner/service/reload/cmd/util"
)
func init() {
diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go
index 4444b87f..faf07fd0 100644
--- a/cmd/rr/http/workers.go
+++ b/cmd/rr/http/workers.go
@@ -23,9 +23,9 @@ package http
import (
tm "github.com/buger/goterm"
"github.com/spf13/cobra"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/cmd/util"
"github.com/spiral/roadrunner/service/http"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
+ "github.com/spiral/roadrunner/service/reload/cmd/util"
"net/rpc"
"os"
"os/signal"
diff --git a/cmd/rr/limit/debug.go b/cmd/rr/limit/debug.go
index b9d919dc..0a0c7f76 100644
--- a/cmd/rr/limit/debug.go
+++ b/cmd/rr/limit/debug.go
@@ -4,9 +4,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spiral/roadrunner"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/cmd/util"
"github.com/spiral/roadrunner/service/limit"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
+ "github.com/spiral/roadrunner/service/reload/cmd/util"
)
func init() {
diff --git a/cmd/rr/limit/metrics.go b/cmd/rr/limit/metrics.go
index 947f53fe..edce6e1a 100644
--- a/cmd/rr/limit/metrics.go
+++ b/cmd/rr/limit/metrics.go
@@ -3,9 +3,9 @@ package limit
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cobra"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
rrlimit "github.com/spiral/roadrunner/service/limit"
"github.com/spiral/roadrunner/service/metrics"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
)
func init() {
diff --git a/cmd/rr/main.go b/cmd/rr/main.go
index 54a1f060..f6b15b92 100644
--- a/cmd/rr/main.go
+++ b/cmd/rr/main.go
@@ -23,7 +23,7 @@
package main
import (
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
+ rr "github.com/spiral/roadrunner/service/reload/cmd/rr/cmd"
// services (plugins)
"github.com/spiral/roadrunner/service/env"
@@ -38,8 +38,8 @@ import (
"github.com/spiral/roadrunner/service/static"
// additional commands and debug handlers
- _ "github.com/spiral/roadrunner/cmd/rr/http"
- _ "github.com/spiral/roadrunner/cmd/rr/limit"
+ _ "github.com/spiral/roadrunner/service/reload/cmd/rr/http"
+ _ "github.com/spiral/roadrunner/service/reload/cmd/rr/limit"
)
func main() {
diff --git a/service/reload/watcher.go b/service/reload/watcher.go
index 3596ae73..d5211d19 100644
--- a/service/reload/watcher.go
+++ b/service/reload/watcher.go
@@ -372,8 +372,11 @@ func (w *Watcher) pollEvents(serviceName string, files map[string]os.FileInfo) {
service: serviceName,
}
- delete(removes, path1)
- delete(creates, path2)
+ // remove initial path
+ delete(w.watcherConfigs[serviceName].files, path1)
+ // update with new
+ w.watcherConfigs[serviceName].files[path2] = info2
+
w.Event <- e
}