Exemplo n.º 1
0
  def board_increment():
    board_db = BoardCounter.get_by_key_name(board)

    if not board_db:
      board_db = BoardCounter(key_name = board, thread = [])

    board_db.counter += 1
    board_db.put()

    return board_db.counter
Exemplo n.º 2
0
Arquivo: api.py Projeto: a37912/gaeaib
  def get(self):
    boardq = BoardCounter.all()

    return json_response(
        [
          {
            "code":board.code,
            "name":board.name,
            "last" : board.counter,
          }
          for board in boardq
        ]
    )
Exemplo n.º 3
0
Arquivo: api.py Projeto: a37912/gaeaib
  def load(self, lim=None):
    boardq = BoardCounter.all(keys_only=True)
    boardq.order("-date_modify")
    boardq.filter("old", True)

    if not lim:
      lim = self.DEF_COUNT

    return [
          k.name() 
          for k in boardq.fetch(lim)
          if k.name() not in self.BOARDS
    ]
Exemplo n.º 4
0
Arquivo: api.py Projeto: a37912/gaeaib
  def get(self, board):
    board = BoardCounter.get_by_key_name(board)

    return json_response(board.counter if board else None)