This file contains hidden or 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
Traceback (most recent call last): | |
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/gevent/wsgi.py", line 114, in handle | |
result = self.server.application(env, self.start_response) | |
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 275, in __call__ | |
signals.request_finished.send(sender=self.__class__) | |
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send | |
response = receiver(signal=self, sender=sender, **named) | |
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/db/__init__.py", line 85, in close_connection | |
conn.close() | |
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/db/backends/__init__.py", line 244, in close |
This file contains hidden or 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
location / { | |
proxy_pass_header Server; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Scheme $scheme; | |
proxy_pass http://frontends; | |
proxy_next_upstream error; | |
} |
This file contains hidden or 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
upstream frontends { | |
server 127.0.0.1:8001; | |
server 127.0.0.1:8002; | |
server 127.0.0.1:8003; | |
server 127.0.0.1:8004; |
This file contains hidden or 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
[program:web] | |
command=python /var/www/site/Serv.py 80%(process_num)02d | |
process_name=%(program_name)s_%(process_num)02d | |
umask=022 | |
startsecs=0 | |
stopwaitsecs=0 | |
redirect_stderr=true | |
stdout_logfile=/tmp/codoon.log | |
numprocs=4 | |
numprocs_start=1 |
This file contains hidden or 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
__author__ = 'alexander' | |
import os | |
import sys | |
from tornado.options import options, define, parse_command_line | |
import django.core.handlers.wsgi | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
import tornado.wsgi | |
This file contains hidden or 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
//数据表 blogs: | |
CREATE TABLE `blogs` ( | |
`id` int(11) NOT NULL, | |
`object` varbinary(20000) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
//同时建立两个索引表 |
This file contains hidden or 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
class Blog(DynamicBase): | |
title=Column(unicode,max_length=200) | |
content=Column(unicode) | |
post_date=Column(datetime.datetime,db_index=True) | |
auther=FkColumn(User) | |
class Meta: | |
table_name="blogs" | |
connection=connections[DB] |
This file contains hidden or 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
import time | |
proxies = {} | |
class _ConnectionWrapper(object): | |
def __init__(self,conn): | |
self.conn=conn | |
def close(self): | |
pass |
This file contains hidden or 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
import time | |
proxies = {} | |
class _ConnectionWrapper(object): | |
def __init__(self,conn): | |
self.conn=conn | |
def close(self): | |
pass |
This file contains hidden or 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
proxies = {} | |
class _ConnectionWrapper(object): | |
""" | |
用来包装Connection的类 | |
""" | |
def __init__(self,conn): | |
self.conn=conn | |
def close(self): |