Ejemplo n.º 1
0
    def delete_ingest_queue(self):
        """

        Returns:

        """
        IngestQueue.deleteQueue(self.nd_proj, endpoint_url=None)
Ejemplo n.º 2
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
Ejemplo n.º 3
0
    def delete_ingest_queue(self):
        """
        Delete the current ingest queue
        Returns:
            None

        """
        IngestQueue.deleteQueue(self.nd_proj, endpoint_url=None)
Ejemplo n.º 4
0
    def delete_ingest_queue(self):
        """
        Delete the current ingest queue
        Returns:
            None

        """
        IngestQueue.deleteQueue(self.nd_proj, endpoint_url=None)
Ejemplo n.º 5
0
    def delete_ingest_queue(self):
        """
        Delete the current ingest queue and removes it as an event source of
        the ingest lambda if it's connected.

        Returns:
            None
        """
        queue = IngestQueue(self.nd_proj)
        self.remove_sqs_event_source_from_lambda(queue.arn, INGEST_LAMBDA)
        IngestQueue.deleteQueue(self.nd_proj)
Ejemplo n.º 6
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
Ejemplo n.º 7
0
 def teardown_class(self):
     """Teardown class parameters"""
     TileIndexDB.deleteTable(endpoint_url=settings.DYNAMO_ENDPOINT)
     IngestQueue.deleteQueue(nd_proj, endpoint_url=settings.SQS_ENDPOINT)
     UploadQueue.deleteQueue(nd_proj, endpoint_url=settings.SQS_ENDPOINT)
Ejemplo n.º 8
0
 def teardown_class(self):
     """Teardown parameters"""
     IngestQueue.deleteQueue(nd_proj, endpoint_url=self.endpoint_url)