Untitled
unknown
plain_text
2 years ago
1.1 kB
9
Indexable
def get_existing_tests_status_summary(self):
queue_result = self.db.execute_dql_query(
f"SELECT COUNT(*)"
f" FROM {WORKFLOW_TABLE_NAME}"
f" WHERE {WORKFLOW_COLUMNS['status'][0]} = 'QUEUE';"
)["results"][0][0]
scheduled_result = self.db.execute_dql_query(
f"SELECT COUNT(*)"
f" FROM {WORKFLOW_TABLE_NAME}"
f" WHERE {WORKFLOW_COLUMNS['status'][0]} = 'SCHEDULED';"
)["results"][0][0]
starting_result = self.db.execute_dql_query(
f"SELECT COUNT(*)"
f" FROM {WORKFLOW_TABLE_NAME}"
f" WHERE {WORKFLOW_COLUMNS['status'][0]} = 'STARTING';"
)["results"][0][0]
in_progress_result = self.db.execute_dql_query(
f"SELECT COUNT(*)"
f" FROM {WORKFLOW_TABLE_NAME}"
f" WHERE {WORKFLOW_COLUMNS['status'][0]} = 'IN_PROGRESS';"
)["results"][0][0]
return queue_result, scheduled_result, starting_result, in_progress_result
Simplify these 4 queries into oneEditor is loading...
Leave a Comment