Exemplo n.º 1
0
    def get(self):
        try:
            # 只检查参数,不作业务逻辑处理
            name = self._check_argument('name', expect_types=(str, unicode))

            self.finish({'code': ECODE.SUCCESS, 'msg': u'Hello! %s' % name})

            if __debug__:
                LOG.debug(self)

        except BaseError, e:
            LOG.error(e, exc_info=True)
            self.finish({'code':e.e_code, 'msg': '%s' % e})
Exemplo n.º 2
0
 def _test_task():
     LOG.debug("PeriodicCallback")
Exemplo n.º 3
0
 def _test_task():
     LOG.debug("PeriodicCallback")