Permalink
Browse files

Add Queue.Clear

  • Loading branch information...
1 parent bae41f9 commit 7845d9c668fa6ab20a1794bdbcc68086639e561c Evan Shaw committed Jul 12, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 ironmq.go
View
@@ -158,6 +158,11 @@ func (q *Queue) Info() (*QueueInfo, error) {
return &qi, nil
}
+// Clear clears all messages from the queue.
+func (q *Queue) Clear() error {
+ return q.Client.req("POST", "queues/"+q.Name+"/clear", nil, nil)
+}
+
// Get takes one Message off of the queue. The Message will be returned to the queue
// if not deleted before the item's timeout.
func (q *Queue) Get() (*Message, error) {

0 comments on commit 7845d9c

Please sign in to comment.