|
@@ -26,9 +26,10 @@ class PushCommandView(View):
|
|
|
if not command:
|
|
|
return HttpResponse(444)
|
|
|
try:
|
|
|
+ djangoLogger = logging.getLogger('django')
|
|
|
+ djangoLogger.info('开始调用')
|
|
|
back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE). \
|
|
|
communicate(timeout=2)
|
|
|
- djangoLogger = logging.getLogger('django')
|
|
|
djangoLogger.info('调用pushtool日志:\n {}'.format(back))
|
|
|
return HttpResponse(back)
|
|
|
except Exception as e:
|