Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized jobs request #5962

Merged
merged 14 commits into from
Apr 11, 2023
Merged

Optimized jobs request #5962

merged 14 commits into from
Apr 11, 2023

Conversation

nmanovic
Copy link
Contributor

@nmanovic nmanovic commented Apr 1, 2023

No description provided.

@nmanovic
Copy link
Contributor Author

@SpecLad , could you please look?

cvat/apps/engine/serializers.py Show resolved Hide resolved
cvat/apps/engine/serializers.py Show resolved Hide resolved

class Meta:
model = models.Project
fields = ('url', 'id', 'name', 'owner', 'assignee',
'bug_tracker', 'task_subsets', 'created_date', 'updated_date', 'status',
'dimension', 'organization', 'target_storage', 'source_storage',
'tasks', 'labels',
)
'tasks', 'labels')
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary change.

Comment on lines 1245 to 1250
queryset = Job.objects.select_related('assignee', 'segment__task__data',
'segment__task__project').annotate(Count('issues', distinct=True),
task_labels_count=Count('segment__task__label',
filter=Q(segment__task__label__parent__isnull=True), distinct=True),
proj_labels_count=Count('segment__task__project__label',
filter=Q(segment__task__project__label__parent__isnull=True), distinct=True)).all()
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you reformat this like in ProjectViewSet? It's hard to understand which arguments are for what.

@nmanovic nmanovic merged commit 14dc68e into develop Apr 11, 2023
@nmanovic nmanovic deleted the nm/opt_jobs_request branch April 11, 2023 05:21
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants