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

[Cal-5] Calendar API #324

Merged
merged 11 commits into from Jan 30, 2023
Merged

[Cal-5] Calendar API #324

merged 11 commits into from Jan 30, 2023

Conversation

CommanderStorm
Copy link
Member

@CommanderStorm CommanderStorm commented Dec 9, 2022

This API delivers a basic Calendar API

This is the final PR in the calendar PR-Train

@CommanderStorm CommanderStorm self-assigned this Dec 9, 2022
@CommanderStorm CommanderStorm added the server Related to the backend/server label Dec 9, 2022
@CommanderStorm CommanderStorm force-pushed the calendar-api branch 3 times, most recently from a53fab5 to f8a93f4 Compare December 26, 2022 14:20
@CommanderStorm CommanderStorm changed the base branch from main to diesel December 29, 2022 16:36
@CommanderStorm CommanderStorm marked this pull request as ready for review January 2, 2023 15:18
@CommanderStorm CommanderStorm changed the base branch from diesel to calendar-scraper January 2, 2023 15:19
@CommanderStorm CommanderStorm changed the title Calendar API [Cal-4] Calendar API Jan 2, 2023
@CommanderStorm CommanderStorm force-pushed the calendar-api branch 2 times, most recently from f547f8f to 5ba219b Compare January 2, 2023 15:53
Base automatically changed from calendar-scraper to main January 2, 2023 19:40
@octycs
Copy link
Contributor

octycs commented Jan 7, 2023

I was just trying to run the server and let it scrape, but it appears to fail after a short while:

[2023-01-07T22:18:08Z INFO  navigatum_server::calendar::continous_scraping] Starting scraping calendar entrys
[2023-01-07T22:18:17Z INFO  navigatum_server::calendar::continous_scraping] Scraped 0.09% (avg 305.3ms/key, total 9.2s) result-Stats { cnt: 30, min: 0, avg: 125, max: 2906 } in time-Stats { cnt: 10, min: 401.3ms, avg: 818.2ms, max: 3.0s }
[2023-01-07T22:18:46Z WARN  navigatum_server::calendar::continous_scraping] The following ScrapeOrder cannot be fulfilled: ScrapeRoomTask { key: "0101.01.135", room_id: 7931, from: 2022-06-10, to: 2022-06-10 }
[2023-01-07T22:18:52Z INFO  navigatum_server::calendar::continous_scraping] Scraped 0.18% (avg 742.5ms/key, total 44.5s) result-Stats { cnt: 60, min: 0, avg: 208, max: 6367 } in time-Stats { cnt: 19, min: 397.3ms, avg: 731.1ms, max: 3.0s }
[2023-01-07T22:18:59Z INFO  navigatum_server::calendar::continous_scraping] Scraped 0.27% (avg 570.6ms/key, total 51.4s) result-Stats { cnt: 90, min: 0, avg: 170, max: 6367 } in time-Stats { cnt: 29, min: 380.1ms, avg: 678.9ms, max: 3.0s }
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/calendar/tumonline_calendar.rs:154:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Do you know this problem by chance?

The concerned room is 0101.02.133 and the event has the singleEventID 889730446 and starts on 2022-09-28T15:00:00.
It has the status gelöscht, so we might want to skip these kinds of entries anyway

@CommanderStorm
Copy link
Member Author

Do you know this problem by chance?

The concerned room is 0101.02.133 and the event has the singleEventID 889730446 and starts on 2022-09-28T15:00:00. It has the status gelöscht, so we might want to skip these kinds of entries anyway

I have fixed this issue.
gelöscht or other unwanted status'es are filtered out in a central place while transitioning from the calendar_scrape to the calendar table, as this seemed cleaner. We can change this design, if you think this would be better ;)

@octycs
Copy link
Contributor

octycs commented Jan 11, 2023

We can change this design, if you think this would be better ;)

No that's good I think 👍

@CommanderStorm CommanderStorm marked this pull request as draft January 18, 2023 00:31
@CommanderStorm CommanderStorm changed the title [Cal-4] Calendar API [Cal-5] Calendar API Jan 18, 2023
@CommanderStorm CommanderStorm force-pushed the calendar-api branch 3 times, most recently from 47293ee to 9ebe294 Compare January 18, 2023 01:01
@CommanderStorm CommanderStorm changed the base branch from main to calendar-microservice January 18, 2023 01:01
@CommanderStorm CommanderStorm marked this pull request as ready for review January 18, 2023 01:01
Base automatically changed from calendar-microservice to main January 23, 2023 14:18
openapi.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@octycs octycs left a comment

Choose a reason for hiding this comment

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

Thank you for all the effort! I've got only a few comments, else I think it's ready to be merged.

calendar/README.md Outdated Show resolved Hide resolved
calendar/README.md Outdated Show resolved Hide resolved
server/src/main.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Related to the backend/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants