Update logic for update_seen of clients
This commit is contained in:
@@ -3,11 +3,20 @@ from __future__ import absolute_import, unicode_literals
|
||||
import logging
|
||||
|
||||
import billard.utils as utils
|
||||
from billard.models import LocationData, Client, Accounting
|
||||
from billard.models import LocationData, Client, Accounting, ClientData
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def process_client_data():
|
||||
data = ClientData.objects.all()
|
||||
for cd in data:
|
||||
client = Client.objects.get(uuid=cd.uuid)
|
||||
client.last_seen = cd.last_seen
|
||||
client.save()
|
||||
cd.delete()
|
||||
|
||||
|
||||
def process_location_data():
|
||||
data = LocationData.objects.filter(processed=False).order_by('tst')
|
||||
for ld in data:
|
||||
|
||||
Reference in New Issue
Block a user