本文整理汇总了Python中bhsearch.api.BloodhoundSearchApi.delete_doc方法的典型用法代码示例。如果您正苦于以下问题:Python BloodhoundSearchApi.delete_doc方法的具体用法?Python BloodhoundSearchApi.delete_doc怎么用?Python BloodhoundSearchApi.delete_doc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bhsearch.api.BloodhoundSearchApi
的用法示例。
在下文中一共展示了BloodhoundSearchApi.delete_doc方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: milestone_deleted
# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import delete_doc [as 别名]
def milestone_deleted(self, milestone):
try:
search_api = BloodhoundSearchApi(self.env)
search_api.delete_doc(MILESTONE_TYPE, milestone.name)
except Exception, e:
if self.silence_on_error:
self.log.error("Error occurs during milestone indexing. \
The error will not be propagated. Exception: %s", e)
else:
raise
示例2: ticket_deleted
# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import delete_doc [as 别名]
def ticket_deleted(self, ticket):
"""Called when a ticket is deleted."""
try:
search_api = BloodhoundSearchApi(self.env)
search_api.delete_doc(TICKET_TYPE, ticket.id)
except Exception, e:
if self.silence_on_error:
self.log.error("Error occurs during deleting ticket. \
The error will not be propagated. Exception: %s", e)
else:
raise
示例3: resource_deleted
# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import delete_doc [as 别名]
def resource_deleted(self, resource, context):
# pylint: disable=unused-argument
try:
search_api = BloodhoundSearchApi(self.env)
search_api.delete_doc(
get_product(self.env).prefix, MILESTONE_TYPE, resource.name)
except Exception, e:
if self.silence_on_error:
self.log.error("Error occurs during milestone indexing. \
The error will not be propagated. Exception: %s", e)
else:
raise
示例4: wiki_page_deleted
# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import delete_doc [as 别名]
def wiki_page_deleted(self, page):
"""Called when a ticket is deleted."""
try:
search_api = BloodhoundSearchApi(self.env)
search_api.delete_doc(
get_product(self.env).prefix, WIKI_TYPE, page.name)
except Exception, e:
if self.silence_on_error.lower() == "true":
self.log.error("Error occurs during wiki indexing. \
The error will not be propagated. Exception: %s", e)
else:
raise