cvzi / mensahd

☕ Parser for openmensa.org for canteens of Studierendenwerk Heidelberg, Mannheim, Stuttgart, Ulm and Hamburg
https://cvzi.github.io/mensahd/
GNU General Public License v3.0
12 stars 1 forks source link

Parser seems to be running only at 9 in the morning #23

Closed tomkoenecke closed 1 year ago

tomkoenecke commented 2 years ago

Hello from Stuttgart,

we have been using your API for a couple of months now and are really happy with it. Thank you for the work.

However, since a couple of days ago, the data in stuttgart/today/... is only updating at around 9am. Could you move the parser runs to an earlier time again?

Did I understand it correctly that the switch to github actions causes this change?

Thank you!

cvzi commented 2 years ago

Yes it changed with github actions because they run on a fixed schedule, before the parser would just run on every request.

I changed the schedule. The earliest update should be available at about 5:30am now. And every 30 minutes after that.

tomkoenecke commented 2 years ago

Thank you for the quick update!

tomkoenecke commented 2 years ago

The first commit to today is currently running at 7am, not 5:30am. 7 is early enough, just wanted to drop this observation, as you wrote 5:30 earlier.

cvzi commented 2 years ago

I noticed it too. No idea what's the reason for it. It looks like the runs before ~6:50am were skipped every day.

The cron schedule seems correct. Github shows it as:

Runs every 16 and 46th minute past the 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12th hour on Mon, Tue, Wed, Thu and Fri. Actions schedules run at most every 5 minutes. Learn more

These are UTC times, so the earliest should be 3:16 UTC which is 5:16 local time. But it never ran before ~6:50am local time.

cvzi commented 2 years ago

When Github has high load, they delay or skip running the action

Generally, the delay time is about 3 to 10 minutes. Sometimes, it may be more, even dozens of minutes, or more than one hour.

He also said that if the delay time is too long, the scheduled workflow may be not triggered at that day. Therefore, it's not recommended to use GitHub Actions scheduled workflows for production tasks that require execution guarantee.

https://upptime.js.org/blog/2021/01/22/github-actions-schedule-not-working/

cvzi commented 1 year ago

It seems that this has resolved itself