reviewboard.search.signal_processor¶
The signal processor for Review Board search.
-
class
SignalProcessor
(*args, **kwargs)[source]¶ Bases:
haystack.signals.BaseSignalProcessor
“Listens for signals and updates the search index.
This will listen for any signals that would affect the search index, and invokes a suitable Haystack callback to immediately update the data stored in the index.
This only updates the search index if:
- Search is enabled.
- The current search engine backend supports on-the-fly indexing.
-
save_signals
= [(<class 'reviewboard.reviews.models.review_request.ReviewRequest'>, <django.dispatch.dispatcher.Signal object>, u'review_request'), (<class 'django.contrib.auth.models.User'>, <django.db.models.signals.ModelSignal object>, u'instance'), (<class 'reviewboard.accounts.models.Profile'>, <django.db.models.signals.ModelSignal object>, u'instance')][source]¶
-
delete_signals
= [(<class 'reviewboard.reviews.models.review_request.ReviewRequest'>, <django.db.models.signals.ModelSignal object>), (<class 'django.contrib.auth.models.User'>, <django.db.models.signals.ModelSignal object>)][source]¶
-
check_handle_save
(instance_kwarg, **kwargs)[source]¶ Conditionally update the search index when an object is updated.
Parameters: - instance_kwarg (unicode) – The name of the instance parameter.
- **kwargs (dict) – Signal arguments. These will be passed to
handle_save()
.
-
check_handle_delete
(**kwargs)[source]¶ Conditionally update the search index when an object is deleted.
Parameters: **kwargs (dict) – Signal arguments. These will be passed to handle_delete()
.
-
handle_save
(**kwargs)[source]¶ Update the search index when an object is updated.
If there’s any error writing to the search backend, the error will be caught and logged.
Parameters: **kwargs (dict) – Signal arguments. These will be passed to handle_save()
.
-
handle_delete
(**kwargs)[source]¶ Update the search index when an object is deleted.
If there’s any error writing to the search backend, the error will be caught and logged.
Parameters: **kwargs (dict) – Signal arguments. These will be passed to handle_save()
.