本文整理汇总了Python中sentry.models.Release.get方法的典型用法代码示例。如果您正苦于以下问题:Python Release.get方法的具体用法?Python Release.get怎么用?Python Release.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sentry.models.Release
的用法示例。
在下文中一共展示了Release.get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_release
# 需要导入模块: from sentry.models import Release [as 别名]
# 或者: from sentry.models.Release import get [as 别名]
def get_release(self, project, data):
if not data.get('release'):
return
return Release.get(
project=project,
version=data['release'],
)
示例2: preprocess_step
# 需要导入模块: from sentry.models import Release [as 别名]
# 或者: from sentry.models.Release import get [as 别名]
def preprocess_step(self, processing_task):
frames = self.get_valid_frames()
if not frames:
logger.debug('Event %r has no frames with enough context to '
'fetch remote source', self.data['event_id'])
return False
if self.data.get('release'):
self.release = Release.get(
project=self.project,
version=self.data['release'],
)
self.populate_source_cache(frames)
return True
示例3: get_release
# 需要导入模块: from sentry.models import Release [as 别名]
# 或者: from sentry.models.Release import get [as 别名]
def get_release(self, create=False):
"""Convenient helper to return the release for the current data
and optionally creates the release if it's missing. In case there
is no release info it will return `None`.
"""
release = self.data.get('release')
if not release:
return None
if not create:
return Release.get(project=self.project, version=self.data['release'])
timestamp = self.data.get('timestamp')
if timestamp is not None:
date = datetime.fromtimestamp(timestamp).replace(tzinfo=timezone.utc)
else:
date = None
return Release.get_or_create(
project=self.project,
version=self.data['release'],
date_added=date,
)
示例4: get_release
# 需要导入模块: from sentry.models import Release [as 别名]
# 或者: from sentry.models.Release import get [as 别名]
def get_release(self, project, data):
if not data.get("release"):
return
return Release.get(project=project, version=data["release"])