insert a reload step

main thread run 'thread_db' directly
insert a 'ulimit' command before run the server
This commit is contained in:
breakwa11 2015-10-10 19:47:50 +08:00
parent 36dc8f9463
commit c73127d858
5 changed files with 21 additions and 10 deletions

View file

@ -7,6 +7,7 @@ os.chdir(os.path.split(os.path.realpath(__file__))[0])
import server_pool
import db_transfer
from shadowsocks import shell
#def test():
# thread.start_new_thread(DbTransfer.thread_db, ())
@ -19,10 +20,16 @@ class MainThread(threading.Thread):
def run(self):
db_transfer.DbTransfer.thread_db()
def main():
shell.check_python()
if len(sys.argv) <= 3:
db_transfer.DbTransfer.thread_db()
else:
thread = MainThread()
thread.start()
while True:
time.sleep(99999)
if __name__ == '__main__':
#server_pool.ServerPool.get_instance()
#server_pool.ServerPool.get_instance().new_server(2333, '2333')
thread = MainThread()
thread.start()
while True:
time.sleep(99999)
main()