| 311 | self._delete_chord_key(key) |
| 312 | |
| 313 | def _restore_deps(self, gid, request): |
| 314 | app = self.app |
| 315 | try: |
| 316 | deps = GroupResult.restore(gid, backend=self) |
| 317 | except Exception as exc: # pylint: disable=broad-except |
| 318 | callback = maybe_signature(request.chord, app=app) |
| 319 | logger.exception('Chord %r raised: %r', gid, exc) |
| 320 | self.chord_error_from_stack( |
| 321 | callback, |
| 322 | ChordError(f'Cannot restore group: {exc!r}'), |
| 323 | ) |
| 324 | return |
| 325 | if deps is None: |
| 326 | try: |
| 327 | raise ValueError(gid) |
| 328 | except ValueError as exc: |
| 329 | callback = maybe_signature(request.chord, app=app) |
| 330 | logger.exception('Chord callback %r raised: %r', gid, exc) |
| 331 | self.chord_error_from_stack( |
| 332 | callback, |
| 333 | ChordError(f'GroupResult {gid} no longer exists'), |
| 334 | ) |
| 335 | return deps |
| 336 | |
| 337 | def _delete_chord_key(self, key): |
| 338 | doc = self._firestore_document(key) |