Ejemplo n.º 1
0
 def presence_stream(self, body, msg):
     current = self.ws.handler.active_client
     a = Admin(id=body['tags']['user_id'])
     a.in_office = body['fields']['value']
     user = a.json()
     user['times'] = a.get_punchcard(self.INFLUX)
     body['user'] = user
     self.sendto({'event':'presence', '_to':current.address, 'data':body})
     return True
Ejemplo n.º 2
0
 def presence_stream(self, body, msg):
     current = self.ws.handler.active_client
     a = Admin(id=body['tags']['user_id'])
     a.in_office = body['fields']['value']
     user = a.json()
     user['times'] = a.get_punchcard(self.INFLUX)
     body['user'] = user
     self.sendto({
         'event': 'presence',
         '_to': current.address,
         'data': body
     })
     return True