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

feat: OCC and OCS Calendar Import/Export #49995

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

Conversation

SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Dec 30, 2024

Summary

This adds the ability to export calendars via the OCS and OCC.

OCC Export

Command: calendar:export
Arguments: userId calendarId format filepath

OCC Import

Command: calendar:import
Arguments: userId calendarId format filepath
Options: errors, validation, supersede, show-created, show-updated, show-skipped, show-errors

OCS Export

Endpoint: /ocs/v2.php/calendar/export
Request: GET/POST
{
"id": "personal",
"fmt": "xcal", (optional "ical, jcal, xcal", defaults to "ical")
"user": "user1" (optional admin permissions required)
}

Performance

  • Export performance bottle neck seems to be CPU core max out due to single process execution, tests on dev setup with 16k of events takes about 5min or 60 items / second
  • Import performance bottle neck seems to be database write performance, tests on dev setup with 16k of events, takes about 30min or 10 items / second

Checklist

@SebastianKrupinski SebastianKrupinski added the 2. developing Work in progress label Dec 30, 2024
@SebastianKrupinski SebastianKrupinski self-assigned this Dec 30, 2024
@SebastianKrupinski SebastianKrupinski force-pushed the enh/issues-563-calendar-import-export branch from b0ee614 to 5198d6b Compare January 18, 2025 19:26
@SebastianKrupinski SebastianKrupinski force-pushed the enh/issues-563-calendar-import-export branch from c69a4fb to 8a6dd83 Compare January 26, 2025 18:15
@SebastianKrupinski
Copy link
Contributor Author

Hi @tcitworld

I was wondering if you would be willing to test this out with some of your larger live data calendars?

@SebastianKrupinski SebastianKrupinski force-pushed the enh/issues-563-calendar-import-export branch from 59a2223 to 67dc029 Compare January 27, 2025 21:35
@SebastianKrupinski SebastianKrupinski force-pushed the enh/issues-563-calendar-import-export branch from 67dc029 to 8ad0991 Compare February 4, 2025 17:18
@SebastianKrupinski SebastianKrupinski marked this pull request as ready for review February 4, 2025 17:19
@SebastianKrupinski SebastianKrupinski force-pushed the enh/issues-563-calendar-import-export branch from 8ad0991 to 213c1aa Compare February 4, 2025 17:20
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski SebastianKrupinski force-pushed the enh/issues-563-calendar-import-export branch from a2f9ff4 to 8eff6e4 Compare February 11, 2025 19:37
*
* @since 31.0.0
*
* @template-extends Response<int, array<string, mixed>>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @template-extends Response<int, array<string, mixed>>
* @template-extends Response<Http::STATUS_*, array<string, mixed>>

To fix the psalm warning below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kesselb you're amazing! You're title should be psalm master!

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

2 participants