当前位置: 首页>>代码示例>>Python>>正文


Python BloodhoundSearchApi.delete_doc方法代码示例

本文整理汇总了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
开发者ID:domaemon,项目名称:bloodhound-qa,代码行数:12,代码来源:milestone_search.py

示例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
开发者ID:domaemon,项目名称:bloodhound-qa,代码行数:13,代码来源:ticket_search.py

示例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
开发者ID:thimalk,项目名称:bloodhound,代码行数:14,代码来源:milestone_search.py

示例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
开发者ID:Stackato-Apps,项目名称:bloodhound,代码行数:14,代码来源:wiki_search.py


注:本文中的bhsearch.api.BloodhoundSearchApi.delete_doc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。