Skip to content

Commit

Permalink
Only index records if the storage transaction is committed (fixes #15)
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed May 23, 2017
1 parent 2db6391 commit 3a74ff0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ Changelog
- Flush indices when server is flushed (fixes #4)
- Perform insertions and deletion in bulk for better efficiency (fixes #5)

**Bug fixes**

- Only index records if the storage transaction is committed (fixes #15)


0.0.1 (2017-05-22)
------------------

- Import code from `Kinto official tutorial <http://kinto.readthedocs.io/en/stable/tutorials/write-plugin.html>`_

4 changes: 2 additions & 2 deletions kinto_elasticsearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from kinto.core import load_default_settings
from kinto.events import ServerFlushed
from kinto.core.events import ResourceChanged
from kinto.core.events import AfterResourceChanged

from . import indexer
from . import listener
Expand All @@ -27,7 +27,7 @@ def includeme(config):
# Activate end-points.
config.scan("kinto_elasticsearch.views")

config.add_subscriber(listener.on_record_changed, ResourceChanged,
config.add_subscriber(listener.on_record_changed, AfterResourceChanged,
for_resources=("record",))
config.add_subscriber(listener.on_server_flushed, ServerFlushed)

Expand Down

0 comments on commit 3a74ff0

Please sign in to comment.