Wandering-Cursor / ontu-schedule-bot

Still in BETA - A bot for gettings schedule of ONTU
MIT License
2 stars 0 forks source link

[FR] Automatic update of nobot cookie #11

Closed makisukurisu closed 1 year ago

makisukurisu commented 1 year ago

Is your feature request related to a problem? Please describe. It's really annoying to wait for 10–15 seconds for the message to arrive if cookies are dated. I propose to set up an "auto-refresh" task to update cookies each 20–30 minutes (since cookie's TTL is 30 minutes exactly - I propose to update them every 30 minutes).

Describe the solution you'd like A periodic task on bot to send a request to Admin server to update cookies.

Describe alternatives you've considered Waiting for 10–15 seconds. But that's a bit long sometimes.

Additional context Perhaps it's possible to make this process on admin side, but I don't know if that's a good idea, since that would require some kind of service/thread for this specific task.

makisukurisu commented 1 year ago

Should be tested now

makisukurisu commented 1 year ago

Task works, I didn't experience any drops in performance. Closing the ticket, if issue will persist - I'll reopen it.