datatracker/bin/daily
Jennifer Richards faa5f9394e
chore: Drop cron jobs replaced by celery tasks (#7105)
* chore: Remove notify-expirations from bin/weekly

* chore: Remove idindex_update from bin/hourly

* chore: Remove rfc-editor-index-updates from bin/daily

* chore: Remove rfc-editor-index-updates from bin/every15m

* chore: Remove celerized tasks from bin/daily

 * ietf/bin/expire-ids
 * ietf/manage.py send_reminders
 * ietf/manage.py fetch_meeting_attendance

* chore: Remove send-scheduled-mail from every15m

Leaves an empty shell of a script...

* chore: Remove iana-*-updates from bin/hourly
2024-02-26 13:51:32 -06:00

55 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
# Nightly datatracker jobs.
#
# This script is expected to be triggered by cron from
# /etc/cron.d/datatracker
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
# Datatracker directory
DTDIR=/a/www/ietf-datatracker/web
cd $DTDIR/
logger -p user.info -t cron "Running $DTDIR/bin/daily"
# Run the hourly jobs first
$DTDIR/bin/hourly
# Set up the virtual environment
source $DTDIR/env/bin/activate
# Update our information about the current version of some commands we use
$DTDIR/ietf/manage.py update_external_command_info
# Get IANA-registered yang models
#YANG_IANA_DIR=$(python -c 'import ietf.settings; print ietf.settings.SUBMIT_YANG_IANA_MODEL_DIR')
# Hardcode the rsync target to avoid any unwanted deletes:
# rsync -avzq --delete rsync.ietf.org::iana/yang-parameters/ /a/www/ietf-ftp/yang/ianamod/
rsync -avzq --delete /a/www/ietf-ftp/iana/yang-parameters/ /a/www/ietf-ftp/yang/ianamod/
# Get Yang models from Yangcatalog.
#rsync -avzq rsync://rsync.yangcatalog.org:10873/yangdeps /a/www/ietf-ftp/yang/catalogmod/
/a/www/ietf-datatracker/scripts/sync_to_yangcatalog
# Populate the yang repositories
$DTDIR/ietf/manage.py populate_yang_model_dirs -v0
# Re-run yang checks on active documents
$DTDIR/ietf/manage.py run_yang_model_checks -v0
# Expire last calls
# Enable when removed from /a/www/ietf-datatracker/scripts/Cron-runner:
$DTDIR/ietf/bin/expire-last-calls
# Send reminders originating from the review app
$DTDIR/ietf/bin/send-review-reminders
# Purge older PersonApiKeyEvents
$DTDIR/ietf/manage.py purge_old_personal_api_key_events 14