We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've added this code to launch from my frontend
func worker(category, city, userResult, sec string, w http.ResponseWriter) { if err := run(category, city, userResult+"/"+sec+".json"); err != nil { fmt.Println("Oops:") os.Stderr.WriteString(err.Error() + "\n") } else { fmt.Println("Else!") fmt.Fprintf(w, "event: close\n\n") w.(http.Flusher).Flush() fmt.Println("Closed") // panic("error") //saveSearchToFireStore(userResult+"/"+sec+".json", email, documentName) } } http.HandleFunc("/api/google-search", func(w http.ResponseWriter, r *http.Request) { //code to get parameters worker(category, city, userResult, sec, w,) }
Everything is working well but for some reasons, I have 5 subprocesses that never end when the search is done.
Any idea how I can end those processes ?
The text was updated successfully, but these errors were encountered:
I assume your run function does the initialization of the app etc.
pass the request context there and once this context is done the processes should be cleaned up
Sorry, something went wrong.
@SegFault42 did my recommendation fixed your issue?
No didn't really understand
This is my run function
It just create the ctx and then run the runFromLocalFile function
No branches or pull requests
I've added this code to launch from my frontend
Everything is working well but for some reasons, I have 5 subprocesses that never end when the search is done.
Any idea how I can end those processes ?
The text was updated successfully, but these errors were encountered: