summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/bin/patchwork-cron.py
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2011-09-19 09:42:44 +0800
committerJeremy Kerr <jk@ozlabs.org>2011-09-19 09:42:44 +0800
commit75d8cf966034e673afe0077ba393d8b2eb3e9b93 (patch)
tree3f6cf6b9f87ad313d23de77b4c33422e7444a1df /apps/patchwork/bin/patchwork-cron.py
parent539b6596dc1bf1d3118631095625e354026da373 (diff)
parentf1e5f6a2c9d737f12290f5bd5a934b74c362616f (diff)
downloadpatchwork-75d8cf966034e673afe0077ba393d8b2eb3e9b93.tar.bz2
patchwork-75d8cf966034e673afe0077ba393d8b2eb3e9b93.tar.xz
Merge branch 'notifications'
Diffstat (limited to 'apps/patchwork/bin/patchwork-cron.py')
-rwxr-xr-xapps/patchwork/bin/patchwork-cron.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/patchwork/bin/patchwork-cron.py b/apps/patchwork/bin/patchwork-cron.py
new file mode 100755
index 0000000..e9bd0c1
--- /dev/null
+++ b/apps/patchwork/bin/patchwork-cron.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import sys
+from patchwork.utils import send_notifications
+
+def main(args):
+ errors = send_notifications()
+ for (recipient, error) in errors:
+ print "Failed sending to %s: %s" % (recipient.email, ex)
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
+