Cal-CS-61A-Staff / 61a-code

Web-based IDE for Python, Scheme, and SQL intended for students taking CS 61A.
MIT License
7 stars 9 forks source link

Lecture 7 link broken #16

Closed papajohn closed 5 years ago

papajohn commented 5 years ago

FYI, https://code.cs61a.org/07.py gives a 404, perhaps because it times out (or maybe because of the unusual imports).

rahularya50 commented 5 years ago

Sorry, the cache didn't clear for some reason. The link works now, at least for me.

rahularya50 commented 5 years ago

What happens is after each commit to master course_deploy sends a POST request to code.cs61a.org to refresh its cache, but there's some sort of race condition where the POST request is sometimes handled before cs61a.org itself is updated.

So immediately after commiting a new lecture.py file, sometimes code.cs61a.org will be out of date. But after another commit is made to master, code.cs61a.org will refresh again and sort itself out. I'm trying to see how to best fix this - I might just set up a cron job to periodically refresh code.cs61a.org regardless, so even if it's not refreshed by the build system it'll still be up to date after a short delay.

Alternatively, I might end up just removing the cache entirely, and accessing the registry every time a shortlink is accessed, if I can't fix this issue some other way.

Again, sorry about this!

papajohn commented 5 years ago

Thanks!

On Wed, Sep 11, 2019 at 4:45 PM Rahul Arya notifications@github.com wrote:

What happens is after each commit to master course_deploy sends a POST request to code.cs61a.org to refresh its cache, but there's some sort of race condition where the POST request is sometimes handled before cs61a.org itself is updated.

So immediately after commiting a new lecture.py file, sometimes code.cs61a.org will be out of date. I might end up just removing the cache entirely, and accessing the registry every time a shortlink is accessed, if I can't fix this issue some other way.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cal-CS-61A-Staff/61a-editor/issues/16?email_source=notifications&email_token=AACOFEO2OZJZCINLSGEXTZ3QJF7JNA5CNFSM4IV2MJ22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6QG2YI#issuecomment-530607457, or mute the thread https://github.com/notifications/unsubscribe-auth/AACOFEKHKNDNNA4LVZZKEK3QJF7JNANCNFSM4IV2MJ2Q .