Пример #1
0
    def on_message(self, message):
        logging.info("got message %r", message)
        parsed = tornado.escape.json_decode(message)
        
        #php-fpm
        fpm = PHPFPM()
        
        chat = {
            "id": str(uuid.uuid4()),
            "body": parsed["body"],
            "php":fpm.get()
            }
        chat["html"] = self.render_string("message.html", message=chat)

        ChatSocketHandler.update_cache(chat)
        ChatSocketHandler.send_updates(chat)
Пример #2
0
    def on_message(self, message):
        logging.info("got message %r", message)
        parsed = tornado.escape.json_decode(message)

        #php-fpm
        fpm = PHPFPM()

        chat = {
            "id": str(uuid.uuid4()),
            "body": parsed["body"],
            "php": fpm.get()
        }
        chat["html"] = self.render_string("message.html", message=chat)

        ChatSocketHandler.update_cache(chat)
        ChatSocketHandler.send_updates(chat)
Пример #3
0
#!/usr/bin/env python
"""
<description>

"""

__author__="Beck Xu"
__date__ ="$2012-8-19 16:19:38$"

from php.fpm import PHPFPM

if __name__ == "__main__":
    
    fpm = PHPFPM()
    print fpm
    tmp = fpm.get()
    print tmp
    
    print "Hello World"
Пример #4
0
#!/usr/bin/env python
"""
<description>

"""

__author__ = "Beck Xu"
__date__ = "$2012-8-19 16:19:38$"

from php.fpm import PHPFPM

if __name__ == "__main__":

    fpm = PHPFPM()
    print fpm
    tmp = fpm.get()
    print tmp

    print "Hello World"