aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2021-09-07 11:28:35 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2021-09-13 12:50:16 -0400
commita819fc1df86721eda36eee89d0235c89b3159d6b (patch)
treebf4b7f7f15d7e7947f8d2ba81f79b4b48f75d2c4 /src/dashboard
parentd93346a716bde5237b7cfef5c10ea56e4922b59a (diff)
Add user specified CI file entry
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Ia920130612da8fcde9d1a0d5dde7861904857162 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/dashboard')
-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