summaryrefslogtreecommitdiff
path: root/ishtar_common/management/commands/ishtar_excute_admin_tasks.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-06-01 20:28:39 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-06-01 20:28:39 +0200
commitffa61d536ee171006cf4b485f71aa84ba9051317 (patch)
tree40c2c8f82db7598101e02c1d12a777913e25de11 /ishtar_common/management/commands/ishtar_excute_admin_tasks.py
parentd65230970c2c40fbbde74b49b38e20dabc575332 (diff)
parent9b7629324fe6bfcf912259c31176da81a015559f (diff)
downloadIshtar-ffa61d536ee171006cf4b485f71aa84ba9051317.tar.bz2
Ishtar-ffa61d536ee171006cf4b485f71aa84ba9051317.zip
Merge branch 'v0.9' into wheezy
Diffstat (limited to 'ishtar_common/management/commands/ishtar_excute_admin_tasks.py')
-rw-r--r--ishtar_common/management/commands/ishtar_excute_admin_tasks.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/ishtar_common/management/commands/ishtar_excute_admin_tasks.py b/ishtar_common/management/commands/ishtar_excute_admin_tasks.py
new file mode 100644
index 000000000..3fe66ad3b
--- /dev/null
+++ b/ishtar_common/management/commands/ishtar_excute_admin_tasks.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from django.core.management.base import BaseCommand, CommandError
+
+from ishtar_common import models
+
+
+class Command(BaseCommand):
+ help = "./manage.py ishtar_execute_admin_tasks\n\n"\
+ "Launch pending administration tasks."
+
+ def handle(self, *args, **options):
+ for task in models.AdministrationTask.objects.filter(state='S').all():
+ task.execute()