Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Expose priority of more statuses of job for new web portal use. - #491

Merged
Hongzhi Li (hongzhili) merged 1 commit into
microsoft:dltsdevfrom
Gerhut:dltsdev
Sep 11, 2019
Merged

Hongzhi Li (hongzhili) merged 1 commit into
microsoft:dltsdevfrom
Gerhut:dltsdev

Conversation

@Gerhut

Copy link
Copy Markdown
Member

No description provided.

@hao1939

Copy link
Copy Markdown
Contributor

👍

def get_job_priority(self):
cursor = self.conn.cursor()
query = "select jobId, priority from {} where jobId in (select jobId from {} where jobStatus in (\"queued\", \"scheduling\", \"running\"))".format(self.jobprioritytablename, self.jobtablename)
query = "select jobId, priority from {} where jobId in (select jobId from {} where jobStatus in (\"queued\", \"scheduling\", \"running\", \"unapproved\", \"pausing\", \"paused\"))".format(self.jobprioritytablename, self.jobtablename)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement may have performance issue if we have large number of jobs in the job table. It should be fine for now. If we hit the performance issue later, this statement can be changed to use joint table selection and build index on foreign key.

@hongzhili
Hongzhi Li (hongzhili) merged commit 0f35a32 into microsoft:dltsdev Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants