Usage Example
leanderme opened this issue · comments
Leander Melms commented
Hi,
I'm following allong the example process jobs in the README and trying to get it to work.
in main.go, I'm calling StartWorkers()
which is equivalent to the main func of the example. Later, I'm enqueuing a job after an incoming HTTP request.
Now it seems like StartWorkers()
seems to block the HTTP request as no connections are accepted after calling StartWorkers()
.
I'm sure this is a beginner question and that there is a trivial mistake, but I can't figure it out.
Leander Melms commented
Edit: Found that
// Wait for a signal to quit:
signalChan := make(chan os.Signal, 1)
signal.Notify(signalChan, os.Interrupt, os.Kill)
<-signalChan
// Stop the pool
pool.Stop()
was the "problem".