Lines Matching full:tasks
7 # including special tasks executed before and after the job, and each steps
29 # tasks. This is to guarantee to include reset before the job starts and repair
120 """A cache to hold tasks for multiple hosts.
126 """Try to get tasks from cache.
132 @return: The list of special tasks that are related to given host and
134 However, [] means no special tasks found in cache.
150 tasks = models.SpecialTask.objects.filter(
154 self[host_id] = TaskCache(tasks, search_start_time, search_end_time)
158 """A cache that hold tasks for a host.
161 def __init__(self, tasks=[], start_time=None, end_time=None): argument
164 self.tasks = tasks
169 """Try to get tasks from cache.
174 @return: The list of special tasks that are related to the job id.
176 However, [] means no special tasks found in cache.
180 return [task for task in self.tasks if task.queue_entry and
193 @param task_caches: Special tasks that's from a previous query.
238 """Get special tasks ran before and after the test job.
241 @param task_caches: Special tasks that's from a previous query.
247 # Special tasks run before job starts.
249 # Special tasks run after job finished.
252 # Skip locating special tasks if hqe is None, or not started yet, as
257 # Assume special tasks for the test job all start within 2 hours
266 tasks = task_caches.try_get(self.host.id, self.id,
268 if tasks is None:
271 tasks = task_caches.try_get(self.host.id, self.id,
274 tasks = models.SpecialTask.objects.filter(
278 tasks = [task for task in tasks if task.queue_entry and
281 for task in tasks:
292 @return: A list of special tasks and test job information.
347 # Cache of special tasks, hostname: ((start_time, end_time), [tasks])
362 @return: A list of special tasks and test job information that has
387 tasks' start/end time, if the job is a test job. Otherwise, return
406 tasks' start/end time.