Exemplo n.º 1
0
 def load(cls, location_id):
   if location_id not in LOCATIONS:
     info = util.deserialize(r.get(location_id))
     session_key = kvs.get('session_key_' + location_id)
     info['session_key'] = session_key
     location = cls(**info)
     LOCATIONS[location_id] = location
   return LOCATIONS[location_id]
Exemplo n.º 2
0
def list_all():
  return util.deserialize(r.get('all'))
Exemplo n.º 3
0
def default_location(ctx, parsed):
  loc = util.deserialize(r.get('default'))
  loc_ref = Location(**loc)

  ctx.reply(parsed, location=str(loc_ref))
  return True