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
评论列表
文章目录