Skip to content

Commit

Permalink
prepare version 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
i2y committed Jul 21, 2015
1 parent 9f591d7 commit 3e03efc
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Actor
Distributed Computing
~~~~~~~~~~~~~~~~~~~~~
.. code:: python
# comsumer.mochi
from mochi.actor.mailbox import KombuMailbox, ZmqInbox
Expand All @@ -149,22 +150,22 @@ Distributed Computing
spawn_with_mailbox(consumer, mailbox)
wait_all()
```

```python
# producer.mochi
from mochi.actor.mailbox import KombuMailbox, ZmqOutbox
mailbox = KombuMailbox('sqs://<access_key_id>@<secret_access_key>:80//',
'<queue_name>',
dict(region='<region>'))
mailbox ! [1, 2, 3]
mailbox ! 'exit'
mailbox = ZmqOutbox('tcp://localhost:9999')
mailbox ! [4, 5, 6]
mailbox ! 'exit'
```
.. code:: python
# producer.mochi
from mochi.actor.mailbox import KombuMailbox, ZmqOutbox
mailbox = KombuMailbox('sqs://<access_key_id>@<secret_access_key>:80//',
'<queue_name>',
dict(region='<region>'))
mailbox ! [1, 2, 3]
mailbox ! 'exit'
mailbox = ZmqOutbox('tcp://localhost:9999')
mailbox ! [4, 5, 6]
mailbox ! 'exit'
Flask
Expand Down

0 comments on commit 3e03efc

Please sign in to comment.