small tweaks

This commit is contained in:
Erik Winter 2024-12-23 12:33:47 +01:00
parent 34cdfc73e2
commit 5985356c99
5 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,8 @@
plan-build:
go build -o dist/plan ./plan
plan-deploy: plan-deploy:
cd plan && go build -o plan . && mv plan ~/bin cp dist/plan ~/bin
sync-run: sync-run:
cd sync/service && go run . -dbname localhost -dbport 5432 -dbname planner -dbuser test -dbpassword test -port 8092 -key testKey cd sync/service && go run . -dbname localhost -dbport 5432 -dbname planner -dbuser test -dbpassword test -port 8092 -key testKey

BIN
dist/plan vendored Executable file

Binary file not shown.

BIN
dist/plannersync vendored

Binary file not shown.

View File

@ -100,7 +100,7 @@ func (s *Server) SyncGet(w http.ResponseWriter, r *http.Request) {
} }
fmt.Fprint(w, string(body)) 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) { 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) 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 // ShiftPath splits off the first component of p, which will be cleaned of

View File

@ -39,7 +39,7 @@ func main() {
"dbUser": *dbUser, "dbUser": *dbUser,
}) })
recurrer := NewRecur(repo, repo, logger) recurrer := NewRecur(repo, repo, logger)
go recurrer.Run(10 * time.Second) go recurrer.Run(6 * time.Hour)
srv := NewServer(repo, *apiKey, logger) srv := NewServer(repo, *apiKey, logger)
go http.ListenAndServe(fmt.Sprintf(":%s", *apiPort), srv) go http.ListenAndServe(fmt.Sprintf(":%s", *apiPort), srv)