Skip to content

Commit dc3ff63

Browse files
committed
Add export_channels_to_kolibri_public to deploy-migrate
Catch missing chef user.
1 parent cfa7193 commit dc3ff63

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ migrate:
3838
# 4) Remove the management command from this `deploy-migrate` recipe
3939
# 5) Repeat!
4040
deploy-migrate:
41-
echo "Nothing to do here"
41+
python contentcuration/manage.py export_channels_to_kolibri_public
4242

4343
contentnodegc:
4444
python contentcuration/manage.py garbage_collect

contentcuration/kolibri_public/management/commands/export_channels_to_kolibri_public.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ class Command(BaseCommand):
3131
def _republish_problem_channels(self):
3232
twenty_19 = datetime(year=2019, month=1, day=1)
3333
five_minutes = timedelta(minutes=5)
34-
chef_user = User.objects.get(email="chef@learningequality.org")
34+
try:
35+
chef_user = User.objects.get(email="chef@learningequality.org")
36+
except User.DoesNotExist:
37+
logger.error("Could not find chef user to republish channels")
38+
return
3539
channel_qs = Channel.objects.filter(
3640
public=True,
3741
deleted=False,

0 commit comments

Comments
 (0)