30 lines
848 B
Python
Executable file
30 lines
848 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import datetime, os, sys
|
|
import syslog
|
|
|
|
# boilerplate
|
|
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
|
|
sys.path = [ basedir ] + sys.path
|
|
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
|
|
|
|
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
|
|
if os.path.exists(virtualenv_activation):
|
|
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
|
|
|
|
syslog.openlog(os.path.basename(__file__), syslog.LOG_PID, syslog.LOG_USER)
|
|
|
|
import django
|
|
django.setup()
|
|
|
|
from ietf.doc.expire import *
|
|
|
|
if not in_draft_expire_freeze():
|
|
for doc in get_expired_drafts():
|
|
send_expire_notice_for_draft(doc)
|
|
expire_draft(doc)
|
|
syslog.syslog("Expired draft %s-%s" % (doc.name, doc.rev))
|
|
|
|
syslog.syslog("Cleaning up draft files")
|
|
clean_up_draft_files()
|