aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/dashboard/tasks.py')
-rw-r--r--src/dashboard/tasks.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dashboard/tasks.py b/src/dashboard/tasks.py
index 3f88449..93e6a22 100644
--- a/src/dashboard/tasks.py
+++ b/src/dashboard/tasks.py
@@ -81,11 +81,15 @@ def free_hosts():
).filter(
end__lt=timezone.now(),
job__complete=True,
- resource__isnull=False
+ complete=False,
+ resource__isnull=False,
)
for booking in bookings:
ResourceManager.getInstance().releaseResourceBundle(booking.resource)
+ booking.complete = True
+ print("Booking", booking.id, "is now completed")
+ booking.save()
@shared_task