File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11
11
opts : ' -Gbgcolor=transparent -Gtruecolor=true'
12
12
13
13
pygments : false
14
+
15
+ examples_url : http://github.com/rabbitmq/rabbitmq-tutorials/blob/master
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ The queue name is specified by the `routing_key` variable:
217
217
{% endhighlight %}
218
218
219
219
220
- [(full send .py source )](http : // github.com/rabbitmq/rabbitmq-tutorials/blob/master /python/send.py)
220
+ [(full send .py source )]({{ examples_url }} / python / send .py )
221
221
222
222
### Receiving
223
223
@@ -312,7 +312,7 @@ whenever necessary.
312
312
313
313
{% endhighlight %}
314
314
315
- [(full receive.py source)](http: // github.com/rabbitmq/rabbitmq-tutorials/blob/master /python/receive.py)
315
+ [(full receive.py source)]({{ examples_url }} /python/receive.py)
316
316
317
317
### Putting it all together
318
318
Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ it's value is ignored for `fanout` exchanges. Here goes the code for
249
249
body=message)
250
250
print " [x] Sent %r" % (message,)
251
251
{ % endhighlight % }
252
+ [(full emit_log.py source)]({ { examples_url }} /python/emit_log.py)
252
253
253
254
As you see, we avoided declaring exchange. If the `logs` exchange
254
255
isn't created at the time this code is executed the message will be
@@ -285,6 +286,7 @@ The code for `receive_logs.py`:
285
286
286
287
pika.asyncore_loop()
287
288
{ % endhighlight % }
289
+ [(full receive_logs.py source)]({ { examples_url }} /python/receive_logs.py)
288
290
289
291
290
292
We're done. If you want to save logs to a file, just open a console and type:
Original file line number Diff line number Diff line change @@ -287,6 +287,8 @@ Final code of our `new_task.py` script:
287
287
))
288
288
print " [x] Sent %r" % (message,)
289
289
{ % endhighlight % }
290
+ [(full new_task.py source)]({ { examples_url }} /python/new_task.py)
291
+
290
292
291
293
And our worker:
292
294
@@ -315,6 +317,7 @@ And our worker:
315
317
316
318
pika.asyncore_loop()
317
319
{ % endhighlight % }
320
+ [(full worker.py source)]({ { examples_url }} /python/worker.py)
318
321
319
322
320
323
Using message acknowledgments and `prefetch_count` you may set up
You can’t perform that action at this time.
0 commit comments