aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/dashboard')
-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()