Esempio n. 1
0
 def render_page(self, errors=None):
     ''' Addes extra params to render() '''
     user = self.get_current_user()
     boxes = filter(lambda box: box.source_code is not None, Box.all())
     self.render('upgrades/source_code_market.html', 
         user=user, boxes=boxes, errors=errors
     )
Esempio n. 2
0
def scoring_round():
    '''
    Executed as a periodic callback for main io_loop: Iterates of all the boxes
    and scores each box.
    '''
    boxes = list(Box.all())
    logging.info("Starting scoring round with %d boxes" % len(boxes))
    for box in boxes:
        score_box(box)
    logging.info("Scoring round completed")
Esempio n. 3
0
async def get_boxes():
    return await Box_Pydantic.from_queryset(Box.all())