In periodic reverificaiton, use schedule_special_task() instead of straight object creation. This is the right path to use for creating tasks -- it include duplication avoidance and automatic owner tagging.
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4120 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/monitor_db_cleanup.py b/scheduler/monitor_db_cleanup.py
index f1eaac4..74ad604 100644
--- a/scheduler/monitor_db_cleanup.py
+++ b/scheduler/monitor_db_cleanup.py
@@ -180,7 +180,7 @@
logging.info('Reverifying dead hosts %s'
% ', '.join(host.hostname for host in hosts))
for host in hosts:
- models.SpecialTask.objects.create(
+ models.SpecialTask.schedule_special_task(
host=host, task=models.SpecialTask.Task.VERIFY)