This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
# stdlib | |
from json import dumps | |
from random import choice | |
# Zato | |
from zato.server.service import Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-11-19 14:08:09,304 - INFO - 6575:Dummy-55 - zato.helpers.input-logger:703 - {u'impl_name': u'zato.server.service.internal.helpers.InputLogger', u'name': u'zato.helpers.input-logger', u'cid': u'K07FHXNC1FN316X6SQ990MCQ80Q6', u'invocation_time': datetime.datetime(2014, 11, 19, 13, 8, 9, 302547), u'job_type': None, u'data_format': None, u'slow_threshold': 99999, u'request.payload': u'{"hello":"how are you?"}', u'wsgi_environ': {u'zato.request_ctx.async_msg': Bunch(action=u'101802', cid=u'K07FHXNC1FN316X6SQ990MCQ80Q6', msg_type=u'0001', payload=u'{"hello":"how are you?"}', service=u'zato.helpers.input-logger')}, u'environ': {}, u'usage': 10921, u'channel': u'invoke-async'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
from zato.common.broker_message import SERVICE | |
from zato.common.util import new_cid | |
from zato.server.service import Service | |
class MyPub(Service): | |
def handle(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
# hutools | |
from huTools.structured import dict2xml | |
# xmltodict | |
from xmltodict import parse as parse_xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root# mkdir /root/.pip | |
root# cd /root/.pip | |
root# wget -c http://curl.haxx.se/ca/cacert.pem | |
root# cat /root/.pip/pip.conf | |
[global] | |
cert = /root/.pip/cacert.pem | |
root# | |
root# ls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
# Zato | |
from zato.server.service import Service | |
class WS(Service): | |
def before_handle(self): | |
self.logger.info('11 TEST_LOG: Entering {}'.format(self.name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-06-12 01:45:09,015 - INFO - 14823:Dummy-13 - test-random-log.ws:22 - 11 TEST_LOG: Entering test-random-log.ws | |
2014-06-12 01:45:09,016 - INFO - 14823:Dummy-13 - test-random-log.ws:22 - 11 TEST_LOG: test-random-log.ws handle | |
2014-06-12 01:45:09,019 - INFO - 14822:Dummy-18 - test-random-log.first-step:22 - 22 TEST_LOG: Entering test-random-log.first-step | |
2014-06-12 01:45:09,019 - INFO - 14822:Dummy-18 - test-random-log.first-step:22 - 22 TEST_LOG: test-random-log.first-step handle | |
2014-06-12 01:45:09,020 - INFO - 14823:Dummy-13 - test-random-log.ws:22 - 11 TEST_LOG: test-random-log.ws took 2 ms | |
2014-06-12 01:45:09,022 - INFO - 14822:Dummy-19 - test-random-log.second-step:22 - 33 TEST_LOG: Entering test-random-log.second-step | |
2014-06-12 01:45:09,022 - INFO - 14822:Dummy-19 - test-random-log.second-step:22 - 33 TEST_LOG: test-random-log.second-step handle | |
2014-06-12 01:45:09,023 - INFO - 14822:Dummy-19 - test-random-log.second-step:22 - 33 TEST_LOG: test-random-log.second-step took 0 ms | |
2014-06-12 01:45:09,02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
# gevent | |
from gevent import spawn_later | |
# Zato | |
from zato.server.service import Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
# gevent | |
from gevent import spawn_later | |
# Zato | |
from zato.server.service import Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from html_service import HTMLService | |
TEMPLATE = """<!doctype html> | |
<html> | |
<head> | |
<title>Sample HTML template</title> | |
</head> | |
<body> |