Esempio n. 1
0
    def handle(self, *args, **options):
        if len(args) < 1: raise CommandError('Please specify %s.' % self.label)
        index_in = args[0]
        if index_in == "all":
            to_update = ExportSchema.get_all_indices()
        else:
            to_update = [json.loads(index_in)]

        for index in to_update:
            processed = rebuild_schemas(index)
            print "processed %s checkpoints matching %s" % (processed, index)
 def handle(self, *args, **options):
     db = ExportSchema.get_db()
     for index in ExportSchema.get_all_indices():
         last = ExportSchema.last(index)
         if not last.timestamp:
             config = ExportConfiguration(db, index, disable_checkpoints=True)
             config.create_new_checkpoint()
             assert ExportSchema.last(index).timestamp
             print "set timestamp for %s" % index
         else:
             print "%s all set" % index
Esempio n. 3
0
 def handle(self, *args, **options):
     db = ExportSchema.get_db()
     for index in ExportSchema.get_all_indices():
         last = ExportSchema.last(index)
         if not last.timestamp:
             config = ExportConfiguration(db,
                                          index,
                                          disable_checkpoints=True)
             config.create_new_checkpoint()
             assert ExportSchema.last(index).timestamp
             print "set timestamp for %s" % index
         else:
             print "%s all set" % index