From 1dcb503545016a9783968a2508d2244c6e376557 Mon Sep 17 00:00:00 2001 From: hanemile Date: Mon, 21 Jan 2019 21:06:53 +0100 Subject: . --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 1d19922..6c8260a 100644 --- a/main.go +++ b/main.go @@ -64,6 +64,12 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { } // calcallforcesHandler calculates all the forces acting on a given star +// +// 1. read the tree index +// 2. If the tree is not in the local cache +// 2.1. Get the tree +// 3. Calculate all the forces acting the given theta +// 4. Write the forces to a file func calcallforcesHandler(w http.ResponseWriter, r *http.Request) { fmt.Println("The calcallforcesHandler was accessed!") @@ -86,7 +92,7 @@ func calcallforcesHandler(w http.ResponseWriter, r *http.Request) { log.Println("[ ! ] The tree is not in local cache, requesting it from the database") // make a http-post request to the databse requesting the tree - requesturl := fmt.Sprintf("http://%s/dumptree/%d", os.Getenv("DATABASE"), treeindex) + requesturl := fmt.Sprintf("http://%s/dumptree/%d", "db", treeindex) log.Println("[ ] Requesting the tree from the database") resp, err := http.Get(requesturl) if err != nil { -- cgit 1.4.1