Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar is not updating downloaded videos #4483

Closed
EdDixon opened this issue Sep 24, 2015 · 22 comments
Closed

Sidebar is not updating downloaded videos #4483

EdDixon opened this issue Sep 24, 2015 · 22 comments
Assignees
Milestone

Comments

@EdDixon
Copy link
Contributor

EdDixon commented Sep 24, 2015

While testing the current 0.15 MAC develop installer, I noticed that after having downloaded videos as the admin user then going back to the side bar the videos were not listed. I then logged out of admin and logged in as a student still the videos which where downloaded and reflected as downloaded in the video tree where not available to either user using the sidebar.

@66eli77
Copy link
Contributor

66eli77 commented Sep 24, 2015

if you restart the server, will those videos be available on the sidebar?

@EdDixon
Copy link
Contributor Author

EdDixon commented Sep 24, 2015

Testing a restart of the server logged in as admin, the previously downloaded did show up correctly but new videos downloaded afterwards did not show up. Roughly 30 minutes later returning from our standup meeting I found that I had been logged out of the server upon logging back in the videos I had just downloaded where listed. I hope this may help solve the problem?

@cpauya cpauya added the Mac label Sep 25, 2015
@cpauya cpauya added this to the 0.15.0 milestone Sep 25, 2015
@cpauya
Copy link
Contributor

cpauya commented Sep 25, 2015

I manually added DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP = True to ~/.kalite/settings.py, restarted the "KA-Lite-Monitor.app", downloaded a video, checked the sidebar, but the newly downloaded video is still greyed-out.

I tried the following but no dice too:

  1. Download a video, navigate to the Learn page - Sidebar - but video is still greyed-out.
  2. Download a video, refresh the page, navigate to the Learn page - Sidebar - but video is still greyed-out.
  3. Download a video, logout the user, navigate to the Learn page as guest - Sidebar - but video is still greyed-out.
  4. Download a video, logout the user, login again, navigate to the Learn page - Sidebar - but video is still greyed-out.

The only solution so far is to restart the server after downloading videos so they are not greyed-out in the sidebar.

I thought adding DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP = True to ~/.kalite/settings.py should do the trick as mentioned by @rtibbles in the hipchat - Testing room.

Anything I missed perhaps?

/cc: @rtibbles @aronasorman

@EdDixon
Copy link
Contributor Author

EdDixon commented Sep 25, 2015

With the latest build I am seeing new behavior where everything including the assessments are now greyed-out where before it was just the video content that should be there?
2015-09-25_10-50-34

@66eli77
Copy link
Contributor

66eli77 commented Sep 25, 2015

I also observed that after start the server, if you don't go to the learn page just yet, instead go to download some videos and then go to learn page, the sidebar will initiate( like it always does for the first time open the sidebar) and all downloaded videos shown up correctly.
this is git install 0.15.x

@EdDixon
Copy link
Contributor Author

EdDixon commented Sep 25, 2015

@66eli77 That is exactly what I did here but I am having a completely different outcome using the MAC installer not GIT?

@rtibbles
Copy link
Member

This seems to be Mac specific - I cannot replicate on Ubuntu/Chrome from git install 0.15.x.

@aronasorman
Copy link
Collaborator

@cpauya, @66eli77 and I replicated this on his macbook. We set this value to be unconditionally false, and now we get the expected behaviour.

I'm not sure what to do, perhaps we should remove this mac-specific hack, and see how we can avoid making KA Lite crash as per #3704?

@aronasorman
Copy link
Collaborator

The frustrating is that any fix we make for this will only be for 0.15, as @rtibbles' cache invalidation PR doesn't use in memory variables for caching.

@aronasorman aronasorman self-assigned this Sep 25, 2015
@rtibbles
Copy link
Member

Yeah, so this is definitely a threading issue - the 'cache_invalidation' is happening inside the subprocess, so its changes to the global variables are not affecting the actual ones used by KA Lite.

@EdDixon
Copy link
Contributor Author

EdDixon commented Sep 25, 2015

Probably a separate issue but, I just noticed that after restarting the server the assessments are still not listed as expected although the videos are. However this was not an issue until this latest fix to address the issue under discussion here so I think it belongs here as well.
2015-09-25_13-18-35

@rtibbles
Copy link
Member

No fix has been made yet for this issue, @EdDixon, so it is not clear it's related.

@aronasorman
Copy link
Collaborator

Resolution was to just add a warning for Mac users, indicating that they need to restart their server once they download videos.

@cpauya
Copy link
Contributor

cpauya commented Sep 28, 2015

Fixed in #4510 -- now have warning for users of Mac server to "restart server after downloading videos".
screenshot 2015-09-28 18 46 53

@cpauya
Copy link
Contributor

cpauya commented Oct 5, 2015

Re-opening this in reference to Mac installer to use DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP

@cpauya cpauya reopened this Oct 5, 2015
@aronasorman
Copy link
Collaborator

This was reopened, so we can useDO_NOT_RELOAD... for the Mac?

@rtibbles
Copy link
Member

rtibbles commented Oct 5, 2015

Punting to 0.16. Where it is fixed. Closing.

@rtibbles rtibbles closed this as completed Oct 5, 2015
@benjaoming
Copy link
Contributor

I thought adding DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP = True to ~/.kalite/settings.py should do the trick as mentioned by @rtibbles in the hipchat - Testing room.

Anything I missed perhaps?

Did you add it after or before from kalite.project.settings.base import * ? :)

@cpauya
Copy link
Contributor

cpauya commented Oct 6, 2015

I added it after the import line, at the end of the settings.py.

@benjaoming
Copy link
Contributor

@cpauya that should work :) You can always test it with:

kalite shell
>>> from django.conf import settings
>>> print settings.DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP

@MCGallaspy MCGallaspy reopened this Oct 12, 2015
@MCGallaspy
Copy link
Contributor

Apparently a problem in 0.14.2. Will check before release.

@MCGallaspy
Copy link
Contributor

User error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants