oncall-engine/engine/apps/api/views
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
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert_group.py Remove resolved and acknowledged filters as we switched to status (#1201) 2023-01-24 18:13:21 +08:00
alert_receive_channel.py Hide direct paging integrations (#1162) 2023-01-20 13:29:57 +00:00
alert_receive_channel_template.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
alerts.py Add alert detail view (#385) 2022-08-19 14:03:07 +05:00
auth.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
channel_filter.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
custom_button.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
escalation_chain.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
escalation_policy.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
features.py Mobile app messaging backend (#874) 2022-11-23 15:56:43 +00:00
gitops.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
integration_heartbeat.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
live_setting.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
maintenance.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
on_call_shifts.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
organization.py Introduce org uuid (#947) 2022-12-06 22:42:58 +08:00
paging.py Add an ability to use an escalation chain for direct paging (#1161) 2023-01-19 18:51:57 +00:00
preview_template_options.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
public_api_tokens.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
resolution_note.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
route_regex_debugger.py Optimize alert group list view (#299) 2022-07-27 14:14:59 +03:00
schedule.py optimize GET /schedules internal API endpoint (#1169) 2023-01-25 11:08:09 +01:00
slack_channel.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
slack_team_settings.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
subscription.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
team.py Mobile app messaging backend (#874) 2022-11-23 15:56:43 +00:00
telegram_channels.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_insight_logs.py Fix propagation for the insight logger 2022-07-25 12:59:12 +04:00
user.py Draft initial logic for user/schedule paging (#1098) 2023-01-17 12:19:08 -03:00
user_group.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
user_notification_policy.py Allow messaging backends to be enabled/disabled per organization (#1151) 2023-01-18 15:52:25 +00:00