Lines Matching full:tasks
7 # including special tasks executed before and after the job, and each steps
33 # tasks. This is to guarantee to include reset before the job starts and repair
124 """A cache to hold tasks for multiple hosts.
130 """Try to get tasks from cache.
136 @return: The list of special tasks that are related to given host and
138 However, [] means no special tasks found in cache.
154 tasks = models.SpecialTask.objects.filter(
158 self[host_id] = TaskCache(tasks, search_start_time, search_end_time)
162 """A cache that hold tasks for a host.
165 def __init__(self, tasks=[], start_time=None, end_time=None): argument
168 self.tasks = tasks
173 """Try to get tasks from cache.
178 @return: The list of special tasks that are related to the job id.
180 However, [] means no special tasks found in cache.
184 return [task for task in self.tasks if task.queue_entry and
197 @param task_caches: Special tasks that's from a previous query.
242 """Get special tasks ran before and after the test job.
245 @param task_caches: Special tasks that's from a previous query.
251 # Special tasks run before job starts.
253 # Special tasks run after job finished.
256 # Skip locating special tasks if hqe is None, or not started yet, as
261 # Assume special tasks for the test job all start within 2 hours
270 tasks = task_caches.try_get(self.host.id, self.id,
272 if tasks is None:
275 tasks = task_caches.try_get(self.host.id, self.id,
278 tasks = models.SpecialTask.objects.filter(
282 tasks = [task for task in tasks if task.queue_entry and
285 for task in tasks:
296 @return: A list of special tasks and test job information.
351 # Cache of special tasks, hostname: ((start_time, end_time), [tasks])
366 @return: A list of special tasks and test job information that has
391 tasks' start/end time, if the job is a test job. Otherwise, return
410 tasks' start/end time.