learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
456 stars 306 forks source link

Fix database move message #5506

Closed benjaoming closed 4 years ago

benjaoming commented 6 years ago

Summary

The current setup command wrongly claims that a database file exists and will be backed up on a clean release:

$ rm -rf ~/.kalite
$ kalite start --foreground
Running 'kalite start' in foreground...
Generating a new secret key file ~/.kalite/secretkey.txt...

Setting up KA Lite; this may take a few minutes; please wait!

   _   __  ___    _     _ _          
  | | / / / _ \  | |   (_) |         
  | |/ / / /_\ \ | |    _| |_ ___    
  |    \ |  _  | | |   | | __/ _ \   
  | |\  \| | | | | |___| | ||  __/   
  \_| \_/\_| |_/ \_____/_|\__\___|   

https://learningequality.org/ka-lite/

         version 0.17.2

(Re)moving database file to temp location, starting clean install. Recovery location: /tmp/tmpkPYEPM
codecov[bot] commented 6 years ago

Codecov Report

Merging #5506 into 0.17.x will decrease coverage by 0.01%. The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           0.17.x    #5506      +/-   ##
==========================================
- Coverage   62.77%   62.76%   -0.02%     
==========================================
  Files         117      117              
  Lines        6555     6553       -2     
==========================================
- Hits         4115     4113       -2     
  Misses       2440     2440
Impacted Files Coverage Δ
kalite/distributed/management/commands/setup.py 43.16% <25%> (-0.49%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7868918...cc760cf. Read the comment docs.

benjaoming commented 6 years ago

@mrpau-eugene could you check if I got it right? It's a bit complicated, would be nice with another pair of eyes to verify :)