def on_delete(self, req, resp, dataset_id, **kwargs):
"""Delete a dataset from the service
This method will delete the entry from the datbase and will also
delete the entire datasets generated by them on filesystem.
:param integer dataset_id: Unique ID of dataset
:returns: Nothing if operation was successful
:rtype: 204 NO CONTENT
"""
try:
delete_task = async_tasks.delete_dataset_by_id(dataset_id)
except LookupError:
raise falcon.HTTPNotFound(description="Couldn't locate dataset")
except OSError as err:
raise falcon.HTTPInternalServerError(description=str(err))
else:
resp.status = falcon.HTTP_204
评论列表
文章目录