'A task to delete the resource and remove it from the database.'

@scheduler.wrappertask
def destroy(self):

    (yield self.delete())
    if (self.id is None):
        return
    try:
        resource_objects.Resource.delete(self.context, self.id)
    except exception.NotFound:
        pass
    self.id = None
