Add worker server / move timeout to 100 seconds
This commit is contained in:
@@ -8,9 +8,9 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var requests chan<- structures.Request
|
||||
var requests chan structures.Request
|
||||
|
||||
func ServeHTTP(queue chan<- structures.Request, end chan<- string) {
|
||||
func ServeHTTP(queue chan structures.Request, end chan<- string) {
|
||||
requests = queue
|
||||
http.HandleFunc("/", httpHandler)
|
||||
err := http.ListenAndServe("127.0.0.1:1337", nil)
|
||||
@@ -59,7 +59,7 @@ func httpHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// todo: put timeout in ENV variable
|
||||
timeout := make(chan bool, 1)
|
||||
go func() {
|
||||
time.Sleep(10 * time.Second)
|
||||
time.Sleep(100 * time.Second)
|
||||
timeout <- true
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user