Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added IronMQ#clearQueue method

  • Loading branch information...
commit d894a6768200d219c9d70271da6c42d5e32c489a 1 parent 689732f
@EvanK authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 IronMQ.class.php
View
13 IronMQ.class.php
@@ -190,6 +190,19 @@ public function getQueue($queue_name) {
}
/**
+ * Clear all messages from queue.
+ *
+ * @param string $queue_name
+ * @return mixed
+ */
+ public function clearQueue($queue_name) {
+ $queue = rawurlencode($queue_name);
+ $url = "projects/{$this->project_id}/queues/$queue/clear";
+ $this->setJsonHeaders();
+ return self::json_decode($this->apiCall(self::POST, $url));
+ }
+
+ /**
* Push a message on the queue
*
* Examples:
Please sign in to comment.
Something went wrong with that request. Please try again.