Merge remote-tracking branch 'origin/master' into Astro

This commit is contained in:
斟酌 鵬兄 2016-05-28 01:49:27 +08:00
commit 5a8b5225c0
4 changed files with 16 additions and 11 deletions

View File

@ -1,25 +1,25 @@
#!/usr/bin/env python3
#!env/bin/python
import os, pwd, grp
import os, sys
from botanjs.config import Config as config, DEBUG
import shutil
from subprocess import Popen
from botanjs.service.webapi import WebAPI
SiteRoot = os.path.abspath( "." )
# Setting the SiteRoot for config
config["Paths"]["SiteRoot"] = SiteRoot;
# Create the lock folder for celery
lockDir = SiteRoot + "env/var/run/celery"
lockDir = os.path.join( SiteRoot, "env", "var", "run" "celery" )
os.makedirs( lockDir, exist_ok=True )
import sys
from subprocess import Popen
sys.path.append( os.path.abspath( "." ) )
from botanjs.service.webapi import WebAPI
RUNTIME_ENV = os.path.abspath( os.path.join( "env", "bin" ) )
if RUNTIME_ENV not in os.environ[ "PATH" ]:
os.environ[ "PATH" ] = RUNTIME_ENV + os.pathsep + os.environ[ "PATH" ]
if __name__ == "__main__":

View File

@ -2,8 +2,9 @@
import os
from tempfile import NamedTemporaryFile
from botanjs.config import Config as config
COMPILER = "/opt/utils/closure.jar"
COMPILER = config[ "BotanJS" ][ "ClosureCompiler" ]
if not os.path.isfile( COMPILER ):
raise Exception( "Compiler not found" )

View File

@ -1,8 +1,9 @@
#!/usr/bin/env python3
import os
from botanjs.config import Config as config
COMPILER = "/opt/utils/yuicompressor.jar"
COMPILER = config[ "BotanJS" ][ "YuiCompressor" ]
if not os.path.isfile( COMPILER ):
raise Exception( "Compiler not found" )

View File

@ -11,3 +11,6 @@ SrcDir = ${Paths:Runtime}/botanjs/src
REDIS_PASS = RJszCzFoeZaULKyY3w5W0kMVF4Ei5ZsqMVexk8wxFzQEYnRuLsdGOkHIAXYe4XNuByZHfbee7GxLsuo9xvEIKdYVpvVRYMUbcf25cuOIWV1sLgxhRv0q9KtH7cLpBroa1BIiqHtbzkd3erenel6siIqyHQxV0jPVFfm0ayCvYmdHiVL1VphBpTSnAX8JNvR2Iim5Q7aGiDpLxQD0nnnc1uQuJjwBNA3jkjddMMvHgN8iYleq4SA2xycqNNFzejlT
CeleryBroker = redis://:${REDIS_PASS}@192.168.80.100:6379/9
ClosureCompiler = /opt/utils/closure.jar
YuiCompressor = /opt/utils/yuicompressor.jar