diff options
-rw-r--r-- | meetingtools/apps/room/management/commands/import_rooms.py | 11 |
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 |