mobius_tasks.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:suite 作者: Staffjoy 项目源码 文件源码
def post(self):
        """ Assign a scheduling task """
        s = Schedule2.query\
            .join(Role)\
            .join(Location)\
            .join(Organization)\
            .filter(Schedule2.state == "mobius-queue", Organization.active == True)\
            .order_by(asc(Schedule2.last_update))\
            .first()

        if s is None:
            abort(404)

        s.transition_to_mobius_processing()

        role = Role.query.get(s.role_id)
        loc = Location.query.get(role.location_id)

        return {
            "schedule_id": s.id,
            "role_id": role.id,
            "location_id": loc.id,
            "organization_id": loc.organization_id,
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号