Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cedric1314 opened this issue Jan 31, 2023 · 1 comment
Open

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

Cedric1314 opened this issue Jan 31, 2023 · 1 comment

Comments

@Cedric1314
Copy link

图片

图片

@chibd2000
Copy link
Owner

  • 任务无法正常进行跟该问题没有直接的关系,是您提交的扫描任务跑完没结果还是什么?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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants