forked from acgsipay/brahama
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
15 lines (12 loc) · 677 Bytes
/
Copy pathapp.py
File metadata and controls
15 lines (12 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python
# -*- coding: utf-8 -*-
import tornado.web
from tools.cache import Cache
from tools.soap.SipayPlus import SipayEcommerce
from tools.logging import Logger
class Application(tornado.web.Application):
def __init__(self, *args, **kwargs):
super(Application, self).__init__(*args, **kwargs)
self.__dict__['logger'] = Logger(mainlog=kwargs['log.file.main'], errorlog=kwargs['log.file.error'], debug=kwargs['debug'])
self.__dict__['memcache'] = Cache(kwargs['memcached.host'], kwargs['memcached.port'], Cache.ENGINE_MEMCACHE, expiration=kwargs['memcached.expiration'])
self.__dict__['soap.sipay_ecommerce'] = SipayEcommerce()