chibd2000 / vue-myscan

myscan的vue图形化 扩展git监控模块

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用时,任务无法正常进行

Cedric1314 opened this issue · comments

  • 任务无法正常进行跟该问题没有直接的关系,是您提交的扫描任务跑完没结果还是什么?docker能否进入celery容器的进程列表截个图,因为最终提交的任务都是给celery容器里面执行的,如果没有跑起来的话可能就是celery进行没跑起来

  • 您上面截图的问题已经改好了,3407c17

views/Settings/Settings.py

    @jwt_required()
    @marshal_with(resource_fields)
    def get(self):
        setting = MailConfig.query.first()
        data = {'wake_type': setting.wake_type, 'is_show': setting.is_show}
        return {'status': True, 'settings': data}

修改如下:

    @jwt_required()
    @marshal_with(resource_fields)
    def get(self):
        count = MailConfig.query.count()
        if count == 1:
            setting = MailConfig.query.first()
            data = {'wake_type': setting.wake_type, 'is_show': setting.is_show}
        else:
            data = {'wake_type': '', 'is_show': 0}
        return {'status': True, 'settings': data}