* [Update] 增加清理celery日志

* [Update] 修复两周前会话命令数量系那是问题

* [Update] 修复两周前会话命令数量系那是问题

* [Update] 修改结构

* [Update] 添加datatable失败的日志

* [Update] 转换配置文件格式

* [Update] 添加traceback
This commit is contained in:
老广
2019-03-18 11:34:13 +08:00
committed by GitHub
parent 01745ead1f
commit 324cf2469f
30 changed files with 171 additions and 338 deletions

View File

@@ -233,6 +233,7 @@ class AdHoc(models.Model):
history.summary = summary
return raw, summary
except Exception as e:
logger.error(e, exc_info=True)
return {}, {"dark": {"all": str(e)}, "contacted": []}
finally:
history.date_finished = timezone.now()

View File

@@ -81,6 +81,8 @@ def clean_celery_tasks_period():
settings.CELERY_LOG_DIR, expire_days
)
subprocess.call(command, shell=True)
command = "echo > {}".format(os.path.join(settings.LOG_DIR, 'celery.log'))
subprocess.call(command, shell=True)
@shared_task