Skip to content

Prevent too frequent request for sample ical#3137

Closed
eouia wants to merge 1 commit intoMagicMirrorOrg:developfrom
MMRIZE:configIssue
Closed

Prevent too frequent request for sample ical#3137
eouia wants to merge 1 commit intoMagicMirrorOrg:developfrom
MMRIZE:configIssue

Conversation

@eouia
Copy link
Contributor

@eouia eouia commented Jun 28, 2023

Recently CalendarLab told me they have troubles due to Too many/frequent requests from MagicMirror Project.
So they will change their URL scheme and service privately per user.

This commit is changing the 5min update cycle to 30min.
But anyway, the example of config should be changed from 30th July.
(I'll post this thing detail in the community)

@rejas
Copy link
Collaborator

rejas commented Jun 28, 2023

Lets increase it even further to 1 day, I propose

@rejas rejas self-requested a review June 28, 2023 12:36
@sdetweil
Copy link
Collaborator

maybe once a week/month.. when was the last time a holiday was added?

with comments of course

is updateInterval by calendar url?

@eouia
Copy link
Contributor Author

eouia commented Jun 28, 2023

At least, too short period (< 1min) fetching should be disallowed, I think.

@rejas
Copy link
Collaborator

rejas commented Jun 28, 2023

maybe once a week/month.. when was the last time a holiday was added?

true.

is updateInterval by calendar url?

no, its for the whole module. adding a per calendar is feasible I think

At least, too short period (< 1min) fetching should be disallowed, I think.

true.

maybe I find the time tonight to extend your PR. Or do you want to tackle it @eouia ?

Copy link
Collaborator

@rejas rejas left a comment

Choose a reason for hiding this comment

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

please increase the interval even further

@eouia
Copy link
Contributor Author

eouia commented Jun 29, 2023

please increase the interval even further

I’m outside atm so cannot modify it. If anyone who can do this exists, plz do it instead of me.

@sdetweil
Copy link
Collaborator

the default needs to be higher too... force people to reset it

@brs-234
Copy link

brs-234 commented Jun 29, 2023

I am a dev from Calendarlabs.com

Ideally, the fetch interval of the holiday calendar should be seven days. (Holiday calendar may get occasionally updated when the country has religious holidays). Most calendar applications default the refresh rate to a week (Ex: calendar app in any Apple device). At the same time, some calendar, like weather needs an hourly refresh

We created a separate URL to be included in config.js.sample file as default. However, users should always be encouraged to pick up their unique URL from the iCal calendar page. (so that they don't fall on the request pool assigned to the default URL)

https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics

The URL has been allowed to accept up to 100,000 requests per day. We will adjust the volume as needed. (currently, there are around three thousand MM systems making requests for the ics URL.

@rejas
Copy link
Collaborator

rejas commented Jun 29, 2023

I’m outside atm so cannot modify it. If anyone who can do this exists, plz do it instead of me.

@eouia If you grant edit access for the maintainers then I can work directly on this branch.

@eouia
Copy link
Contributor Author

eouia commented Jun 29, 2023

I’m outside atm so cannot modify it. If anyone who can do this exists, plz do it instead of me.

@eouia If you grant edit access for the maintainers then I can work directly on this branch.

#3139 would be instead of mine. I don’t care.

@rejas
Copy link
Collaborator

rejas commented Jun 29, 2023

#3139 would be instead of mine. I don’t care.

I'd liek to work on your brnach instead on my draft (so you can get credit too ;-) Plus we have the discussion ehre, so it makes sense to merge this one.

So please add the checkmark on the right that allows edit of maintainers etc

@eouia
Copy link
Contributor Author

eouia commented Jun 29, 2023

Sorry I cannot find "Allow edits from maintainers." checkbox", (Don't know why) Maybe is it not allowed by setting?
Anyway, I don't care the credit itself.
And CalendarLab will change the URL to a private one per registered user, so our example URL should be changed from 30th Jul. So, this fetch itself is not so important, we need a new example URL alternative.

@rejas
Copy link
Collaborator

rejas commented Jun 29, 2023

Sorry I cannot find "Allow edits from maintainers." checkbox", (Don't know why) Maybe is it not allowed by setting?

Isnt it on the right side of the page for you below the list of participants etc

grafik

@brs-234
Copy link

brs-234 commented Jun 29, 2023

Sorry I cannot find "Allow edits from maintainers." checkbox", (Don't know why) Maybe is it not allowed by setting?
Anyway, I don't care the credit itself.
And CalendarLab will change the URL to a private one per registered user, so our example URL should be changed from 30th Jul. So, this fetch itself is not so important, we need a new example URL alternative.

Hi,
URL which we have provided in our last comment is an example url. This url is public and do not require any login.

you will always get updated content from this url.

I’m pasting the url here again for your reference

https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics

Thanks

@khassel
Copy link
Collaborator

khassel commented Jun 29, 2023

@rejas

karsten13@karsten13 MINGW64 /z/foreign/MagicMirror (develop)
$ git fetch origin pull/3137/head:configIssue
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 3), reused 6 (delta 3), pack-reused 0
Unpacking objects: 100% (6/6), 1.30 KiB | 3.00 KiB/s, done.
From github.com:MichMich/MagicMirror
 * [new ref]           refs/pull/3137/head -> configIssue

see https://docs.github.com/de/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally#modifying-an-inactive-pull-request-locally

after the above git fetch ... you have the branch configIssue locally and can work on it. I did not test pushing.

@eouia
Copy link
Contributor Author

eouia commented Jun 30, 2023

Sorry I cannot find "Allow edits from maintainers." checkbox", (Don't know why) Maybe is it not allowed by setting?

Isnt it on the right side of the page for you below the list of participants etc

grafik

I don't know why I can't find it.
스크린샷 2023-06-30 18 09 00

@rejas
Copy link
Collaborator

rejas commented Jun 30, 2023

Weird.... So, will probably have to merge my pr then...

khassel pushed a commit that referenced this pull request Jun 30, 2023
fixes #3138 just in case #3137 doesnt get worked on until the next
release

- inc fetchInterval for sample calender
- add fetchInterval config per calendar
@khassel
Copy link
Collaborator

khassel commented Jun 30, 2023

closing this now because #3139 was merged

@khassel khassel closed this Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants