aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard/tasks.py
diff options
context:
space:
mode:
authorSean Smith <ssmith@iol.unh.edu>2020-08-11 10:41:27 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2020-11-09 21:52:23 +0000
commit986f474e540669fd9fb72810b3f31fa3f4c3e97a (patch)
tree7c3c27720c962577b88f7cccafac3f3b948ddab9 /src/dashboard/tasks.py
parenta45a7552146801154f2267fe7e8fae443605bfe3 (diff)
Analytics changes
Signed-off-by: Sean Smith <ssmith@iol.unh.edu> Change-Id: Iaea350b3042f9c866939a9d1a79bdef1e165c1a7 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/dashboard/tasks.py')
-rw-r--r--src/dashboard/tasks.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/dashboard/tasks.py b/src/dashboard/tasks.py
index 50e64c8..8554f6c 100644
--- a/src/dashboard/tasks.py
+++ b/src/dashboard/tasks.py
@@ -13,7 +13,17 @@ from celery import shared_task
from django.utils import timezone
from booking.models import Booking
from notifier.manager import NotificationHandler
-from api.models import Job, JobStatus, SoftwareRelation, HostHardwareRelation, HostNetworkRelation, AccessRelation
+from api.models import (
+ Job,
+ JobStatus,
+ SoftwareRelation,
+ HostHardwareRelation,
+ HostNetworkRelation,
+ AccessRelation,
+ JobFactory
+)
+
+from resource_inventory.resource_manager import ResourceManager
from resource_inventory.models import ConfigState
@@ -74,4 +84,10 @@ def free_hosts():
resource__isnull=False
)
for booking in bookings:
- booking.resource.release()
+ ResourceManager.getInstance().deleteResourceBundle(booking.resource)
+
+
+@shared_task
+def query_vpn_users():
+ """ get active vpn users """
+ JobFactory.makeActiveUsersTask()