ristekoss / susunjadwal

SusunJadwal - Universitas Indonesia's #1 Student Course Planner App.
http://susunjadwal.cs.ui.ac.id/
34 stars 16 forks source link

Change course schedule update mechanism #32

Closed arielmiki closed 4 years ago

arielmiki commented 5 years ago

This issue is a:

Current behavior:

I see that currently, course schedule is updated using flask cron cli command. I don't know if this is triggered manually or using a scheduler in the server (I don't know if it is correct because I am not familiar with flask cron). At least, that is what I can conclude when seeing this. However, recent course update from SIAK is not reflected by Susun Jadwal.

Requested behavior:

Maybe, we can use in-memory cache and give it TTL, so users always get the most updated schedule. Besides, I think we also need to make update_courses function is able to update the schedule for each major separately. BTW, I don't know if it is possible.

Why this behavior is better:

satraul commented 5 years ago

Courses that stop being updated means that either the cron has stopped or the scraper's SSO has been changed. For compsci it should still be fine tho (it uses mine). @albadrun Any comment?

fairuzi10 commented 4 years ago

Currently, the scheduler is set once per hour, so maybe the schedule in SIAK is updated in the last hour. I think the cache solution is basically equivalent to the scheduler with TTL 1 hour. I believe the solution is to run the scheduler more frequently.

fairuzi10 commented 4 years ago

Closing this as we update the cron job readme. The frequency is subject to discussion of the active maintainers.