Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bootstrapping redis sessions.

  • Loading branch information...
commit c421a088893ac10dd0528cb532c003870f9ffd82 1 parent bb6aac3
@samuelclay authored
@@ -41,8 +41,9 @@
- '',
+ '',
+ '',
@@ -722,9 +723,9 @@ def maintenance_on():
with cd(env.NEWSBLUR_PATH):
run('mv templates/maintenance_off.html templates/maintenance_on.html')
def maintenance_off():
- with cd(env.NEWSBLUR_PATH), settings(warn_only=True):
+ with cd(env.NEWSBLUR_PATH):
run('mv templates/maintenance_on.html templates/maintenance_off.html')
run('git checkout templates/maintenance_off.html')
2  templates/maintenance_off.html
@@ -77,7 +77,7 @@
<img src="/media/img/logo_512.png" class="logo">
<h1>NewsBlur is in <span class="error404">maintenance mode</span></h1>
<div class="description">
- <p>Doing a hefty, yet quick, upgrade to the database. Be back in about about ten minutes. MongoDB obnoxiously re-created a huge index that I dropped, and I can't kill the index creation. This is taking way longer than I anticipated, but once finished (15 more minutes - 11:30AM PT?) it means I'm only a day away from a scaled-out MongoDB.</p>
+ <p>After a failed replication, MongoDB is throwing a fit. Performing a repair on both primary and secondary databases. This will immediately speed up the site. Unfortunately, it takes an hour to complete. It is now past midnight on the east coast.</p>
<p>To pass the time, go surf <a href="">MLKSHK's popular page</a>.</p>
2  utils/
@@ -5,7 +5,7 @@
sessions_count = Session.objects.count()
print " ---> %s sessions in Django" % sessions_count
-batch_size = 10
+batch_size = 1000
r = redis.Redis(connection_pool=settings.REDIS_SESSION_POOL)
for batch in range(int(math.ceil(sessions_count / batch_size))+1):
Please sign in to comment.
Something went wrong with that request. Please try again.