Пример #1
0
    def teardown_class(self):
        """Teardown class parameters"""

        # cleanup tilebucket
        for z_index in (self.z_tile, settings.SUPER_CUBOID_SIZE[2], 1):
            tile_key = self.tile_bucket.encodeObjectKey(
                nd_proj.channel_name,
                nd_proj.resolution,
                self.x_tile,
                self.y_tile,
                z_index,
            )
            self.tile_bucket.deleteObject(tile_key)

        morton_index = XYZMorton(self.tiles)
        supercuboid_key = self.cuboid_bucket.generateSupercuboidKey(
            nd_proj.channel_name, nd_proj.resolution, self.tiles)
        self.cuboid_bucket.deleteObject(supercuboid_key)
        # delete created entities
        TileIndexDB.deleteTable(endpoint_url="http://localhost:8000")
        CuboidIndexDB.deleteTable(endpoint_url="http://localhost:8000")
        IngestQueue.deleteQueue(nd_proj, endpoint_url="http://localhost:4568")
        CleanupQueue.deleteQueue(nd_proj, endpoint_url="http://localhost:4568")
        TileBucket.deleteBucket(endpoint_url="http://localhost:4567")
        try:
            CuboidBucket.deleteBucket(endpoint_url="http://localhost:4567")
        except Exception as e:
            pass
Пример #2
0
    def deleteIngestJob(self, job_id):
        """Delete an ingest job based on job id"""

        try:
            ingest_job = NDIngestJob.fromId(job_id)
            nd_proj = NDIngestProj(ingest_job.project, ingest_job.channel,
                                   ingest_job.resolution)
            # delete the upload queue
            UploadQueue.deleteQueue(
                nd_proj, endpoint_url=ndingest_settings.SQS_ENDPOINT)
            # delete the ingest queue
            IngestQueue.deleteQueue(
                nd_proj, endpoint_url=ndingest_settings.SQS_ENDPOINT)
            # delete the cleanup queue
            CleanupQueue.deleteQueue(
                nd_proj, endpoint_url=ndingest_settings.SQS_ENDPOINT)
            ingest_job.status = INGEST_STATUS_DELETED
            ingest_job.save()
        except Exception as e:
            print(e)
            raise
Пример #3
0
 def teardown_class(self):
     """Teardown class parameters"""
     TileIndexDB.deleteTable(endpoint_url=settings.DYNAMO_ENDPOINT)
     CuboidIndexDB.deleteTable(endpoint_url=settings.DYNAMO_ENDPOINT)
     CleanupQueue.deleteQueue(nd_proj, endpoint_url=settings.SQS_ENDPOINT)
Пример #4
0
 def teardown_class(self):
   """Teardown parameters"""
   CleanupQueue.deleteQueue(nd_proj, endpoint_url=self.endpoint_url)