Skip to content

Tweak Ranked Scrimmages #931

@lowtorola

Description

@lowtorola

Currently, scrimmage rate limiting is based on the number of ranked scrimmage matches run in the past hour. In addition, we enforce a limitation on the number of active scrimmages a team can perform against another team at once. I think we should tweak this system as follows:

  • prevent a team from challenging a team ranked below them (lower rating) to a ranked scrimmage (create a new error variant)

  • tweak our rate limit calculation in Team.can_scrimmage(...) to be based on the team's active ScrimmageRequests in the past hour (see active_statuses in ScrimmageRequestViewSet.create(...) <-- we should ask the AI if there is a way to re-use the ScrimmageRequest and Match querysets across both the rate limit and "too many scrimmage" checks (if you don't parse this then just remind me after your first pass to follow back up on this)

  • in addition, we should ensure that these custom APIException like RankedMatchesDisabed actually propagate their error messages through to the frontend and not mysterious ones like "an error occurred"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions