예제 #1
0
파일: release.py 프로젝트: ranyitz/sentry
 def __eq__(self, other):
     """Make sure that specialized releases are only comparable to the same
     other specialized release.  This for instance lets us treat them
     separately for serialization purposes.
     """
     return Model.__eq__(
         self, other) and self._for_project_id == other._for_project_id
예제 #2
0
    def __getstate__(self):
        state = Model.__getstate__(self)

        # do not pickle cached info.  We want to fetch this on demand
        # again.  In particular if we were to pickle interfaces we would
        # pickle a CanonicalKeyView which old sentry workers do not know
        # about
        state.pop('_project_cache', None)
        state.pop('_group_cache', None)
        state.pop('interfaces', None)

        return state
예제 #3
0
파일: event.py 프로젝트: Kayle009/sentry
    def __getstate__(self):
        state = Model.__getstate__(self)

        # do not pickle cached info.  We want to fetch this on demand
        # again.  In particular if we were to pickle interfaces we would
        # pickle a CanonicalKeyView which old sentry workers do not know
        # about
        state.pop('_project_cache', None)
        state.pop('_group_cache', None)
        state.pop('interfaces', None)

        return state