simple job queue and dispatcher
go get github.com/Natata/jobQueue
jq := jobQueue.NewJobQueue(5)
dp := jobQueue.NewDispatcher(jq, 2)
dp.Run()
jID := int64(5566)
job := jobQueue.NewJob(jID, func() error {
fmt.Printf("job %v complete!\n", jid)
return nil
})
jq.Enqueue(job)