Skip to content
Browse files

Merge pull request #125 from groovecoder/731715-migrate-top-wiki-pages

731715 migrate top wiki pages
  • Loading branch information...
2 parents 2f5a6de + 3e433ce commit 0b36771d2b162372277a0ea68d2771582cc4022e @lmorchard committed Mar 1, 2012
Showing with 9 additions and 4 deletions.
  1. +4 −4 apps/dekicompat/backends.py
  2. +5 −0 scripts/migrate_top.sh
View
8 apps/dekicompat/backends.py
@@ -146,17 +146,17 @@ def get_user(self, user_id):
return None
@staticmethod
- def get_or_create_user(deki_user, sync_attrs=None):
+ def get_or_create_user(deki_user, sync_attrs=('is_superuser',
+ 'is_staff',
+ 'is_active',
+ 'email')):
"""
Grab the User via their UserProfile and deki_user_id.
If non exists, create both.
NOTE: Changes to this method may require changes to
parse_user_info
"""
- if not sync_attrs:
- sync_attrs = ('is_superuser', 'is_staff', 'is_active', 'email')
-
try:
# Try fetching an existing profile mapped to deki user
profile = UserProfile.objects.get(deki_user_id=deki_user.id)
View
5 scripts/migrate_top.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+# Script for staging server migration cron job
+# Migrate most-viewed, recently-updated, longest, and non-english pages
+
+python26 manage.py migrate_to_kuma_wiki --wipe --viewed=50 --recent=50 --longest=50 --nonen=50

0 comments on commit 0b36771

Please sign in to comment.
Something went wrong with that request. Please try again.