summaryrefslogtreecommitdiff
path: root/meetingtools/apps/room
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-10-21 00:03:48 +0200
committerLeif Johansson <leifj@sunet.se>2012-10-21 00:03:48 +0200
commit1907bfa78a3f2364e0856507c78e5eb09a1692f1 (patch)
tree1789948066fa9dfaea1de08fd081dc5d555a2330 /meetingtools/apps/room
parent519b09da29a0ab620e85f1dc32816dd248f5f12d (diff)
option for since
Diffstat (limited to 'meetingtools/apps/room')
-rw-r--r--meetingtools/apps/room/management/commands/import_rooms.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/meetingtools/apps/room/management/commands/import_rooms.py b/meetingtools/apps/room/management/commands/import_rooms.py
index 7944be8..abdc696 100644
--- a/meetingtools/apps/room/management/commands/import_rooms.py
+++ b/meetingtools/apps/room/management/commands/import_rooms.py
@@ -1,3 +1,4 @@
+from optparse import make_option
from django.core.management import BaseCommand
from meetingtools.apps.cluster.models import ACCluster
from meetingtools.apps.room.tasks import import_acc
@@ -6,6 +7,14 @@ __author__ = 'leifj'
class Command(BaseCommand):
+ option_list = BaseCommand.option_list + (
+ make_option('--since',
+ type='int',
+ dest='since',
+ default=0,
+ help='Import all rooms modified <since> seconds ago'),
+ )
+
def handle(self, *args, **options):
for acc in ACCluster.objects.all():
- import_acc(acc,since=0) \ No newline at end of file
+ import_acc(acc,since=options['since']) \ No newline at end of file