diff --git a/bin/daily b/bin/daily index 10d59c698..436e02458 100755 --- a/bin/daily +++ b/bin/daily @@ -59,3 +59,4 @@ $DTDIR/ietf/manage.py fetch_meeting_attendance --latest 2 # Send reminders originating from the review app $DTDIR/ietf/bin/send-review-reminders + diff --git a/bin/mm_hourly b/bin/mm_hourly index 4ae3f89bf..a79e362e1 100755 --- a/bin/mm_hourly +++ b/bin/mm_hourly @@ -6,10 +6,20 @@ # $DTDIR/etc/cron.d/datatracker which should be symlinked from # /etc/cron.d/ +export LANG=en_US.UTF-8 +export PYTHONIOENCODING=utf-8 + +# Make sure we stop if something goes wrong: +program=${0##*/} +trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)"; exit 1' ERR + DTDIR=/a/www/ietf-datatracker/web cd $DTDIR/ # Set up the virtual environment source $DTDIR/env/bin/activate -$DTDIR/ietf/manage.py import_mailman_listinfo +logger -p user.info -t cron "Running $DTDIR/bin/mm_hourly" + +## XXX commented out pending rewrite -- mailman 2 python interface is not available under Python 3 +# $DTDIR/ietf/manage.py import_mailman_listinfo diff --git a/ietf/virtualenv-manage.py b/ietf/virtualenv-manage.py index 6cfe31e06..5d64ea570 100755 --- a/ietf/virtualenv-manage.py +++ b/ietf/virtualenv-manage.py @@ -1,26 +1,11 @@ -#!/usr/bin/env python -# Copyright The IETF Trust 2016-2019, All Rights Reserved +#!/a/www/ietf-datatracker/web/env/bin/python +# Copyright The IETF Trust 2016-2020, All Rights Reserved # -*- coding: utf-8 -*- - -from __future__ import absolute_import, print_function, unicode_literals - -import io import os import sys path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -# change directory so patches etc. will be picked up as expected -os.chdir(path) - -# Virtualenv support -virtualenv_activation = os.path.join(path, "env", "bin", "activate_this.py") -if os.path.exists(virtualenv_activation): - exec(compile(io.open(virtualenv_activation, "rb").read(), virtualenv_activation, 'exec'), dict(__file__=virtualenv_activation)) -else: - raise RuntimeError("Could not find the expected virtual python environment.") - if not path in sys.path: sys.path.insert(0, path)