Skip to content

Optimize queries for participants_data view #533

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

reivvax
Copy link
Contributor

@reivvax reivvax commented Jun 8, 2025

Closes #345

@reivvax reivvax requested a review from MasloMaslane as a code owner June 8, 2025 16:18
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this file, we already have similar script in https://github.com/sio2project/oioioi/blob/master/oioioi/oi/management/commands/import_schools_legacy.py

except Contest.DoesNotExist:
raise CommandError(_("Contest %s does not exist") % options['contest_id'])

# rcontroller = contest.controller.registration_controller()
Copy link
Contributor

Choose a reason for hiding this comment

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

remove unused code

Copy link
Contributor

Choose a reason for hiding this comment

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

please change name in such a way that it is clear that this is dev only script and it creates random data dev_generate_random_oi_participants.py

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can skip this script (and remove it from this PR).
You can remove participants either by clearing the whole database (in dev environment)
or you could run the same command from django shell.

Copy link
Contributor

@twalen twalen left a comment

Choose a reason for hiding this comment

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

Please handle the comments from the review.

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.

/participant_data/ too many queries
2 participants