Lines Matching refs:job
481 def insert_job(self, tag, job, commit=None): argument
488 data = self._get_common_job_data(tag, job)
490 'afe_job_id': job.afe_job_id,
491 'afe_parent_job_id': job.afe_parent_job_id,
493 if job.job_idx is not None:
495 'tko_jobs', data, {'job_idx': job.job_idx}, commit=commit)
498 job.job_idx = self.get_last_autonumber_value()
501 def _get_common_job_data(self, tag, job): argument
505 'label': job.label,
506 'username': job.user,
507 'machine_idx': job.machine_idx,
508 'queued_time': job.queued_time,
509 'started_time': job.started_time,
510 'finished_time': job.finished_time,
511 'build': job.build,
512 'build_version': job.build_version,
513 'board': job.board,
514 'suite': job.suite,
518 def insert_or_update_task_reference(self, job, reference_type, commit=None): argument
529 task_id = job.afe_job_id
530 parent_task_id = job.afe_parent_job_id
532 task_id = job.skylab_task_id
533 parent_task_id = job.skylab_parent_task_id
536 'tko_job_idx': job.job_idx,
541 task_reference_id = self._lookup_task_reference(job)
547 job.task_reference_id = task_reference_id
550 job.task_reference_id = self.get_last_autonumber_value()
553 def update_job_keyvals(self, job, commit=None): argument
559 for key, value in job.keyval_dict.iteritems():
560 where = {'job_id': job.job_idx, 'key': key}
570 def insert_test(self, job, test, commit = None): argument
578 data = {'job_idx':job.job_idx, 'test':test.testname,
581 'reason':test.reason, 'machine_idx':job.machine_idx,
642 def machine_info_dict(self, job): argument
649 hostname = job.machine
650 group = job.machine_group
651 owner = job.machine_owner
662 def insert_or_update_machine(self, job, commit=None): argument
670 job.machine_idx = self._lookup_machine(job.machine)
671 if not job.machine_idx:
672 job.machine_idx = self._insert_machine(job, commit=commit)
673 elif job.machine:
676 self._update_machine_information(job, commit=commit)
679 def _lookup_task_reference(self, job): argument
684 if job.job_idx is None:
687 'id', 'tko_task_references', {'tko_job_idx': job.job_idx})
692 % (len(rows), job.job_idx))
696 def _insert_machine(self, job, commit = None): argument
702 machine_info = self.machine_info_dict(job)
707 def _update_machine_information(self, job, commit = None): argument
713 machine_info = self.machine_info_dict(job)