Skip to content

Commit e005530

Browse files
prabhupantiamareebjamal
authored andcommitted
fix: elasticsearch has no attribute sync (#5733)
1 parent c88fa7f commit e005530

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/views/elastic_cron_helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88
from app.models.event import Event
9-
from app.models.search.sync import rebuild_indices, sync_event_from_database
9+
from app.models.search.sync import rebuild_indices, sync_event_from_database, sync
1010
from app.views.celery_ import celery
1111
from app.views.elastic_search import connect_from_config
1212
from app.views.postgres import get_session_from_config
@@ -25,5 +25,4 @@ def cron_rebuild_events_elasticsearch():
2525

2626
def sync_events_elasticsearch():
2727
"""Sync all newly created, updated or deleted events"""
28-
elastic = connect_from_config()
29-
elastic.sync()
28+
sync()

0 commit comments

Comments
 (0)