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-30 17:26:44 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-06-30 17:26:44 +0200
commitffd57727a66952e12b5236e7567f5fd75eb7e5f8 (patch)
tree2b8ab152e92a95948e9a038ebcef815bfd56aa38 /ishtar_common/management/commands/ishtar_excute_admin_tasks.py
parent2a0842c8ffb0e7eec6b350f9d170670c8376cce8 (diff)
parent18995ac80a961083ad986f4abe984fd649ec40e2 (diff)
downloadIshtar-ffd57727a66952e12b5236e7567f5fd75eb7e5f8.tar.bz2
Ishtar-ffd57727a66952e12b5236e7567f5fd75eb7e5f8.zip
Merge branch 'master' into develop
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()