diff --git a/Makefile b/Makefile index 3a302ca..1b0ba1f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ +plan-build: + go build -o dist/plan ./plan + plan-deploy: - cd plan && go build -o plan . && mv plan ~/bin + cp dist/plan ~/bin sync-run: cd sync/service && go run . -dbname localhost -dbport 5432 -dbname planner -dbuser test -dbpassword test -port 8092 -key testKey diff --git a/dist/plan b/dist/plan new file mode 100755 index 0000000..d151fe6 Binary files /dev/null and b/dist/plan differ diff --git a/dist/plannersync b/dist/plannersync index 5a456c3..23f87a5 100755 Binary files a/dist/plannersync and b/dist/plannersync differ diff --git a/sync/service/handler.go b/sync/service/handler.go index e93c10c..adb98d5 100644 --- a/sync/service/handler.go +++ b/sync/service/handler.go @@ -100,7 +100,7 @@ func (s *Server) SyncGet(w http.ResponseWriter, r *http.Request) { } fmt.Fprint(w, string(body)) - s.logger.Info("served get sync") + s.logger.Info("served sync get") } func (s *Server) SyncPost(w http.ResponseWriter, r *http.Request) { @@ -155,7 +155,7 @@ func (s *Server) SyncPost(w http.ResponseWriter, r *http.Request) { } w.WriteHeader(http.StatusNoContent) - s.logger.Info("served get sync") + s.logger.Info("served sync post") } // ShiftPath splits off the first component of p, which will be cleaned of diff --git a/sync/service/service.go b/sync/service/service.go index 4238b1c..cfbefe2 100644 --- a/sync/service/service.go +++ b/sync/service/service.go @@ -39,7 +39,7 @@ func main() { "dbUser": *dbUser, }) recurrer := NewRecur(repo, repo, logger) - go recurrer.Run(10 * time.Second) + go recurrer.Run(6 * time.Hour) srv := NewServer(repo, *apiKey, logger) go http.ListenAndServe(fmt.Sprintf(":%s", *apiPort), srv)