Skip to content
Snippets Groups Projects
Commit 175f5f00 authored by Vojtech Vitek (V-Teq)'s avatar Vojtech Vitek (V-Teq)
Browse files

Close disque in README examples

parent da1e89da
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ import (
func main() {
// Connect to Disque pool.
jobs, _ := disque.New("127.0.0.1:7711") // Accepts more arguments.
defer jobs.Close()
// Enqueue three jobs with different priorities.
job1, _ := jobs.Add(data1, "high")
......@@ -43,6 +44,7 @@ import (
func main() {
// Connect to Disque pool.
jobs, _ := disque.New("127.0.0.1:7711") // Accepts more arguments.
defer jobs.Close()
for {
// Get job from highest priority queue possible. Blocks by default.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment