update taskworker

This commit is contained in:
zhuyj17 2019-03-04 20:16:19 +08:00
parent 4e222d46be
commit 9129a75537
1 changed files with 3 additions and 2 deletions

5
src/worker/taskworker.py Normal file → Executable file
View File

@ -1,9 +1,10 @@
#!/usr/bin/python3
import sys import sys
if sys.path[0].endswith("worker"): if sys.path[0].endswith("worker"):
sys.path[0] = sys.path[0][:-6] sys.path[0] = sys.path[0][:-6]
from utils import env, tools from utils import env, tools
#config = env.getenv("CONFIG") config = env.getenv("CONFIG")
config = "/opt/docklet/local/docklet-running.conf" #config = "/opt/docklet/local/docklet-running.conf"
tools.loadenv(config) tools.loadenv(config)
from utils.log import initlogging from utils.log import initlogging
initlogging("docklet-taskworker") initlogging("docklet-taskworker")