Skip to content

Instantly share code, notes, and snippets.

@fsouza
Created January 7, 2013 12:43
Show Gist options
  • Select an option

  • Save fsouza/4474705 to your computer and use it in GitHub Desktop.

Select an option

Save fsouza/4474705 to your computer and use it in GitHub Desktop.
package main
import (
"github.com/kr/beanstalk"
)
func main() {
var id uint64
c, err := beanstalk.Dial("tcp", "127.0.0.1:11300")
if err != nil {
panic(err)
}
for err == nil {
if id, _, err = c.Reserve(1e9); err == nil {
err = c.Delete(id)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment