summaryrefslogtreecommitdiffstats
path: root/patchwork/bin/patchwork-cron.py
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-05-24 16:57:33 +0800
committerJeremy Kerr <jk@ozlabs.org>2015-05-27 10:26:41 +0800
commitad2762cf775a8dde508de47164d6429f3fd724f1 (patch)
treee63015a468cfe32c961908f0338d423227799815 /patchwork/bin/patchwork-cron.py
parentf09e982f58384946111d4157fd2b7c2b31b78612 (diff)
downloadpatchwork-ad2762cf775a8dde508de47164d6429f3fd724f1.tar.bz2
patchwork-ad2762cf775a8dde508de47164d6429f3fd724f1.tar.xz
Move to a more recent django project structure
This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'patchwork/bin/patchwork-cron.py')
-rwxr-xr-xpatchwork/bin/patchwork-cron.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/patchwork/bin/patchwork-cron.py b/patchwork/bin/patchwork-cron.py
new file mode 100755
index 0000000..148e97c
--- /dev/null
+++ b/patchwork/bin/patchwork-cron.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+import sys
+from patchwork.utils import send_notifications, do_expiry
+
+def main(args):
+ errors = send_notifications()
+ for (recipient, error) in errors:
+ print "Failed sending to %s: %s" % (recipient.email, ex)
+
+ do_expiry()
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
+