diff --git a/cfgov/search/elasticsearch_helpers.py b/cfgov/search/elasticsearch_helpers.py index 18e44de9103..19c6cb13c92 100644 --- a/cfgov/search/elasticsearch_helpers.py +++ b/cfgov/search/elasticsearch_helpers.py @@ -16,7 +16,7 @@ pre_page_move, ) -from django_opensearch_dsl.signals import BaseSignalProcessor +from django_opensearch_dsl.signals import RealTimeSignalProcessor from opensearchpy import analyzer, token_filter, tokenizer from search.models import Synonym @@ -173,7 +173,7 @@ def rebuild_elasticsearch_index(*indices, stdout=sys.stdout): ) -class WagtailSignalProcessor(BaseSignalProcessor): +class WagtailSignalProcessor(RealTimeSignalProcessor): """Signal processor that reflects Wagtail changes in Elasticsearch. When Wagtail pages are saved, deleted, or moved, we want to update the @@ -198,20 +198,20 @@ def check_afp(self, instance): return instance - def handle_delete(self, sender, instance, **kwargs): - super().handle_delete(sender, self.check_afp(instance), **kwargs) + def handle_pre_delete(self, sender, instance, **kwargs): + super().handle_pre_delete(sender, self.check_afp(instance), **kwargs) def handle_save(self, sender, instance, **kwargs): super().handle_save(sender, self.check_afp(instance), **kwargs) def setup(self): page_published.connect(self.handle_save) - page_unpublished.connect(self.handle_delete) - pre_page_move.connect(self.handle_delete) + page_unpublished.connect(self.handle_pre_delete) + pre_page_move.connect(self.handle_pre_delete) post_page_move.connect(self.handle_save) def teardown(self): page_published.disconnect(self.handle_save) - page_unpublished.disconnect(self.handle_delete) - pre_page_move.disconnect(self.handle_delete) + page_unpublished.disconnect(self.handle_pre_delete) + pre_page_move.disconnect(self.handle_pre_delete) post_page_move.disconnect(self.handle_save) diff --git a/requirements/libraries.txt b/requirements/libraries.txt index 030fee46467..3fe8ae9c095 100644 --- a/requirements/libraries.txt +++ b/requirements/libraries.txt @@ -2,19 +2,19 @@ base36==0.1.1 backports.zoneinfo==0.2.1 beautifulsoup4==4.11.2 -boto3==1.34.54 +boto3==1.34.144 django-autocomplete-light==3.11.0 -django-cors-headers==4.3.1 +django-cors-headers==4.4.0 django-csp==3.8 -django-opensearch-dsl==0.5.2 +django-opensearch-dsl==0.6.2 django-extensions==3.2.3 django-flags==5.0.13 django-formtools==2.5.1 -django-health-check==3.18.1 -django-htmx==1.17.3 +django-health-check==3.18.3 +django-htmx==1.18.0 django-localflavor==4.0 django-mptt==0.14.0 -django-storages==1.14.2 +django-storages==1.14.4 django-treebeard==4.7.1 edgegrid-python==1.3.1 elasticsearch<7.11 # Keep pinned to the deployed ES version @@ -23,14 +23,14 @@ Jinja2==3.1.4 lxml==5.1.0 matplotlib==3.7.5 mozilla-django-oidc==4.0.1 -opensearch-py==2.4.2 -psycopg2-binary==2.9.6 +opensearch-py==2.6.0 +psycopg2-binary==2.9.9 python-dateutil==2.9.0 regdown==1.0.7 requests-aws4auth==1.2.3 -s3transfer==0.10.0 +s3transfer==0.10.2 setuptools>=65.5.1 -tailslide==0.1.1 +tailslide==0.2.0 wagtail-autocomplete==0.11.0 wagtail-content-audit==0.1 wagtail_draftail_anchors==0.6.0 @@ -40,7 +40,7 @@ wagtail-inventory==2.6 wagtail-placeholder-images==0.1.1 wagtail-sharing==2.12.1 wagtail-treemodeladmin==1.9.2 -wagtailmedia==0.15.1 +wagtailmedia==0.15.2 # These packages are installed from GitHub. https://github.com/cfpb/owning-a-home-api/releases/download/0.18.2/owning_a_home_api-0.18.2-py3-none-any.whl diff --git a/requirements/local.txt b/requirements/local.txt index f514cecd9f2..4c9eb9074fe 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -1,6 +1,6 @@ -r base.txt django-cprofile-middleware==1.0.5 -django-debug-toolbar==4.3.0 +django-debug-toolbar==4.4.6 django-sslserver==0.22 pre-commit==3.5.0 -tox==4.13.0 +tox==4.16.0