def add_bucket(self, request, context): """ Return a task id """ task_result = tasks.add_bucket.delay(bucket_name=request.name) return opac_pb2.TaskId(id=task_result.id)
def add_asset(self, request, context): """ Return a task id """ task_result = tasks.add_asset.delay(request.file, request.filename, request.type, request.metadata, request.bucket) return opac_pb2.TaskId(id=task_result.id)