When using Django models from a script, make the current user default to an actual database user named "autotest_system".  This allows for simpler, more consistent code.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4114 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/monitor_db_cleanup.py b/scheduler/monitor_db_cleanup.py
index 3912aab..f1eaac4 100644
--- a/scheduler/monitor_db_cleanup.py
+++ b/scheduler/monitor_db_cleanup.py
@@ -65,7 +65,7 @@
             where=['created_on + INTERVAL timeout HOUR < NOW()'])
         for job in query.distinct():
             logging.warning('Aborting job %d due to job timeout', job.id)
-            job.abort(None)
+            job.abort()
 
 
     def _abort_jobs_past_max_runtime(self):
@@ -83,7 +83,7 @@
             id__in=[row[0] for row in rows])
         for queue_entry in query.distinct():
             logging.warning('Aborting entry %s due to max runtime', queue_entry)
-            queue_entry.abort(None)
+            queue_entry.abort()
 
 
     def _check_for_db_inconsistencies(self):