|
@@ -24,19 +24,16 @@ def popen(command, bg=False):
|
|
string = command
|
|
string = command
|
|
if bg == True:
|
|
if bg == True:
|
|
command = command + ' &'
|
|
command = command + ' &'
|
|
-
|
|
|
|
- print command
|
|
|
|
process = os.popen(command)
|
|
process = os.popen(command)
|
|
output = process.read()
|
|
output = process.read()
|
|
process.close()
|
|
process.close()
|
|
- print output
|
|
|
|
return output
|
|
return output
|
|
|
|
|
|
# 文档转换
|
|
# 文档转换
|
|
def convert():
|
|
def convert():
|
|
check = 'ps -ef | grep master.py | grep -v grep | wc -l'
|
|
check = 'ps -ef | grep master.py | grep -v grep | wc -l'
|
|
value = int(popen(check))
|
|
value = int(popen(check))
|
|
- if value:
|
|
|
|
|
|
+ if value > 1:
|
|
return 1;
|
|
return 1;
|
|
r = redis()
|
|
r = redis()
|
|
c = 'office_file'
|
|
c = 'office_file'
|