1. hideki nara
  2. django-celery-about

Commits

hideki nara  committed 078e31b

raw html を使って fancybox でちゃんと動くようにする

  • Participants
  • Parent commits cfaa9fb
  • Branches default

Comments (0)

Files changed (10)

File source/eta.rst

View file
 
 用語
 ^^^^^^
- 
 .. glossary::
  
     CJT

File source/index.rst

View file
     :depth: 2
     :class: talks-contents
 
+.. raw:: html
+ 
+    <a  class="popup-image" id="popup-image" href="_static/django-celery-title.png">
+        <img src="_static/django-celery-title.png" width="300px"/>
+    </a>
+
 非同期タスクキュー概要
 ===============================================
 
     * :ref:`modindex`
     * :ref:`search`
 
-.. figure:: _static/django-celery-title.png 
-    :name:  popup-image
-    :class: popup-image
-

File source/kombu.rst

View file
     :depth: 2
     :class: talks-contents
 
+.. raw:: html
+ 
+    <a  class="popup-image" id="popup-image" href="_static/kombu-title-image.png">
+        <img src="_static/kombu-title-image.png" width="300px"/>
+    </a>
 
 Messaging framework for Python
 ================================

File source/minimum.rst

View file
     :depth: 2
     :class: talks-contents
 
+.. raw:: html
+ 
+    <a  class="popup-image" id="popup-image" href="_static/title-celery-premier.png">
+        <img src="_static/title-celery-premier.png" width="300px"/>
+    </a>
+
 mkvirtualenv
 ==========================================
 
 
     too hot
 
-.. figure:: _static/title-celery-premier.png
-    :name:  popup-image
-    :class: popup-image

File source/purge.rst

View file
 Workerを止める
 ----------------
 
+- 10件がReady中でWorkerが止まってます
 
-.. figure:: _static/purge/purge_rabbitmq.png
+.. raw:: html
+ 
+    <a  class="popup-image" id="popup-image" href="_static/purge/purge_rabbitmq.png">
+        <img src="_static/purge/purge_rabbitmq.png" /> 
+    </a>
 
-    10件がReady中でWorkerが止まってます
 
 RabbitMQに直接
 ---------------

File source/rabbitmq.rst

View file
 AMQPモデル
 ===========
 
+.. raw:: html
 
-.. figure:: _static/rabbitmq/producer-consumer.png
+    <a  class="popup-image" id="popup-image" href="_static/rabbitmq/producer-consumer.png">
+        <img src="_static/rabbitmq/producer-consumer.png" width="300px"/>
+    </a>
 
-    `Red Hat Enterprise MRG "Chapter. 1 The AMQP 0-10 Model 参考 <http://bit.ly/redhat_mrg_amqp>`_
-
-    ( `MRG Messaging <http://jp.redhat.com/products/jbossenterprisemiddleware/messaging/>`_ )
+- `Red Hat Enterprise MRG "Chapter. 1 The AMQP 0-10 Model 参考 <http://bit.ly/redhat_mrg_amqp>`_
+- ( `MRG Messaging <http://jp.redhat.com/products/jbossenterprisemiddleware/messaging/>`_ )
 
 Message = Header + Body
 --------------------------------------------

File source/request.rst

View file
     :depth: 2
     :class: talks-contents
 
+
+.. raw:: html
+ 
+    <a  class="popup-image" id="popup-image" href="_static/title-celery-advanced.png">
+        <img src="_static/title-celery-advanced.png" width="300px"/>
+    </a>
+
 your_task.request:タスクの実行中コンテキスト 
 ========================================================
 
     >>> current_task
     None
 
-.. figure:: _static/title-celery-advanced.png 
-    :name:  popup-image
-    :class: popup-image

File source/thankyou.rst

View file
     :depth: 2
     :class: talks-contents
 
+.. raw:: html
+ 
+    <a  class="popup-image" id="popup-image" href="_static/thankyou.png">
+        <img src="_static/thankyou.png"  />
+    </a>
+
 マテリアル
 ==============
 
 @hdknr
 -----------------------------------------------------------
 
-
-.. figure:: _static/thankyou.png
-    :name:  popup-image
-    :class: popup-image
-

File source/transport_message.rst

View file
 
 .. contents:: 
     :local:
-    :depth: 2
+    :depth: 3
     :class: talks-contents
 
 Kombu Virtual Transport Message
 
 - http://bit.ly/kombu_virtual_transport_message
 
+kombu.transport.virtual.Message 
+---------------------------------------------
+
 .. code-block:: python 
 
-    fields = {'body': body,
-              'delivery_tag': properties['delivery_tag'],
-              'content_type': payload.get('content-type'),
-              'content_encoding': payload.get('content-encoding'),
-              'headers': payload.get('headers'),
-              'properties': properties,
-              'delivery_info': properties.get('delivery_info'),
-              'postencode': 'utf-8'}
+    class Message(base.Message):
+    ...
+    def __init__(self):
+        ...
+        fields = {'body': body,
+                  'delivery_tag': properties['delivery_tag'],
+                  'content_type': payload.get('content-type'),
+                  'content_encoding': payload.get('content-encoding'),
+                  'headers': payload.get('headers'),
+                  'properties': properties,
+                  'delivery_info': properties.get('delivery_info'),
+                  'postencode': 'utf-8'}
+        ...
 
+MessageはJSONにシリアライズ
+=================================================
 
 .. code-block:: javascript
 
         }
     }
 
-Applcation(Task) Message
-==============================
-
 Body = Task Message for Celery 
 -----------------------------------
 
 - redelivered : 再送されたとか(?) 
 
 Serialization
-=================
+-------------------
 
 Content-Type
------------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 - Body のシリアライゼーション
 - Serializer で決まります。
 
 Content-Encoding
-------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 - Serializer で決まります。
 - utf-8, binary, or us-ascii ...
 
 Transport Properties
-==================================
+------------------------
 
 .. todo::
     スライド分ける?

File themes/talks/static/talks.js

View file
+function popup_image(){
+    $("#popup-image").fancybox({
+                padding: 0,
+                openEffect : 'elastic',
+                closeEffect : 'elastic',
+                closeClick : true,
+    }).trigger('click');
+
+//    setTimeout(function(){ $("#popup-image").trigger('click'); },500);
+}
+
 $(document).keydown(function(e) {
     switch (e.keyCode) {
         case 37:// <-
                 });
             }
             break;
+
+        case 73:    // I (shift-i)
+            popup_image();
+            break;
     }
 });
 
 $(document).ready(function(){
-
-    $("#popup-image").fancybox({
-                padding: 0,
-                openEffect : 'elastic',
-                closeEffect : 'elastic',
-                closeClick : true,
-    });
-
-    setTimeout(function(){ $("#popup-image").trigger('click'); },500);
-
+    popup_image();
 });