Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated README and incremented version number.

  • Loading branch information...
commit efc8fbf8104e41e727986dc35e2eb9c1f2531638 1 parent 9df1164
@paddyforan paddyforan authored
Showing with 68 additions and 2 deletions.
  1. +67 −1 README.md
  2. +1 −1  iron_mq.py
View
68 README.md
@@ -107,9 +107,75 @@ queue.total_messages() # 17
queue.id() # u'502d03d3211a8f5e7742d224'
```
+### Peek at messages
+To view messages without reserving them, use peek:
+
+```python
+msgs = queue.peek(max=10) [{'id': '..', 'body': '..'}, ..]
+```
+
+### Touch a message
+
+To extend the reservation on a reserved message, use touch. The message reservation will be extended by the message's `timeout`.
+
+```python
+queue.touch(msg_id)
+```
+
+### Release a reserved message
+To release a message that is currently reserved, use release:
+
+```python
+queue.release(msg_id)
+```
+
+### Delete a queue
+
+To delete a queue, use `delete_queue`:
+
+```python
+queue.delete_queue()
+```
+
+## Push Queues
+
+### Update Queue Information
+
+To update the queue's push type and subscribers, use update:
+
+```python
+queue.update(subscribers=["http://endpoint1.com", "https://end.point.com/2"], push_type"unicast")
+```
+
+### Add subscribers to a push queue
+
+```python
+queue.add_subscribers(*["http://endpoint1.com", "https://end.point.com/2"])
+```
+
+### Remove subscribers from a push queue
+
+```python
+queue.remove_subscribers(*["http://endpoint1.com", "https://end.point.com/2"])
+```
+
+### Get the push status of a message
+
+```python
+queue.get_message_push_status(message_id) # {"subscribers": [{"retries_delay": 60, "retries_remaining": 2, "status_code": 200, "status": "deleted", "url": "http://endpoint1.com", "id": "52.."}, {..}, ..]}
+```
+
+### Delete a pushed message
+
+If you respond with a 202 status code, the pushed message will be reserved, not deleted, and should be manually deleted. You can get the message ID and subscriber ID from the push message's headers.
+
+```python
+queue.delete_message_push_status(message_id, subscriber_id)
+```
+
# Full Documentation
You can find more documentation here:
* http://iron.io
-* http://docs.iron.io
+* http://dev.iron.io
View
2  iron_mq.py
@@ -181,7 +181,7 @@ def _prepare_subscribers(self, *subscribers):
class IronMQ:
NAME = "iron_mq_python"
- VERSION = "0.3"
+ VERSION = "0.4"
client = None
name = None
Please sign in to comment.
Something went wrong with that request. Please try again.