oncall-engine/engine/apps/schedules
Joey Orlando 3cf2fcf660
optimize GET /schedules internal API endpoint (#1169)
# What this PR does

Fixes slow internal`GET /schedules` endpoints. Using the fake-data
generation script in #1128, I generated 65 calendar schedules in my
local setup. This resulted in the following endpoint performance:
![Screenshot 2023-01-24 at 12 03
16](https://user-images.githubusercontent.com/9406895/214276618-1a9848ba-eb84-49ec-a099-fdd96beac93f.png)

The responses which show ~76 queries were run on the latest `dev`
branch. Responses w/ ~26 queries were run on this branch.

Additionally:
- add typing to a few methods in `apps/schedules/ical_utils.py`
- document `apps/api/permissions/__init__.py:user_is_authorized`
function

## Which issue(s) this PR fixes

https://github.com/grafana/oncall-private/issues/1552

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-01-25 11:08:09 +01:00
..
ical_events Do not include event repetitions terminated before start (until rrule) 2022-11-30 08:56:19 -03:00
migrations centralize timezone validation + add serializer validation for on call shifts and schedules (#924) 2022-12-01 14:13:39 +01:00
models optimize GET /schedules internal API endpoint (#1169) 2023-01-25 11:08:09 +01:00
tasks is_icals_equal fixes (#510) 2022-09-08 16:11:03 +05:00
tests optimize GET /schedules internal API endpoint (#1169) 2023-01-25 11:08:09 +01:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
admin.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
constants.py Schedules alpha fixes (#541) 2022-09-21 11:19:59 +01:00
ical_utils.py optimize GET /schedules internal API endpoint (#1169) 2023-01-25 11:08:09 +01:00
quality_score.py Schedule score backend (#338) 2023-01-04 16:49:58 +00:00