chomp_tasks.py 文件源码

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

项目:suite 作者: Staffjoy 项目源码 文件源码
def get(self):
        """ Return all queued calculations """
        response = {}
        response[API_ENVELOPE] = {}

        for state in ['chomp-queue', 'chomp-processing']:
            data = Schedule2.query.join(Role)\
                .join(Location)\
                .join(Organization)\
                .filter(Schedule2.state == state, Organization.active == True)\
                .all()
            response[API_ENVELOPE][state] = map(
                lambda schedule: marshal(schedule, tasking_schedule_fields),
                data)

        return response
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号