Added signal hook for deleted review requests.
Review Request #8089 — Created April 4, 2016 and discarded
Added signal hook for deleted review requests.
We use signal hooks for building an upgrade compatible database representation of the state of Review Board that we are interested in. This involves us tracking when a reply/review/request is created and so forth. There becomes a disconnect between the internal representation on Review Board and our external store when a review request gets deleted.
Thus, we internally added tracking for when a review request gets deleted (often by a Review Board admin).
Wired up an extension to test this use case.
We are currently running this with an extension on a staging server.
Ran the unit tests.
-
Tool: Pyflakes Processed Files: reviewboard/reviews/signals.py reviewboard/reviews/models/review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/signals.py reviewboard/reviews/models/review_request.py
-
Django includes a built-in signal for model deletions, which you can use to listen to deleted review requests. Can't that be used instead? Deleting review requests is a superuser thing, and not common behavior that a lot of code will need to consider.