Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the signal is triggered, the index_queryset is ignored #29

Open
rafaponieman opened this issue May 22, 2014 · 4 comments
Open

When the signal is triggered, the index_queryset is ignored #29

rafaponieman opened this issue May 22, 2014 · 4 comments

Comments

@rafaponieman
Copy link

Lets say there is a CelerySearchIndex that specifies a reduced index_queryset. Then, the update/delete signal will be called for ANY instance of that model, not restricted to the specified index_queryset. So, when get_instance is called, if the model instance is not included in its manager's default queryset, celery haystack can't find it triggering two errors:

Task celery_haystack.tasks.CeleryHaystackSignalHandler[bff705bb-68fc-4f26-854b-bfde98024014]raised exception: ValueError(u"Couldn't load object '... you model instance...'",)

And

Couldn't load ... you model instance... Somehow it went missing?
@rasca
Copy link

rasca commented Apr 24, 2015

Same here, fixed it by overriding should_update and checking if the instance is in the queryset

@rasca
Copy link

rasca commented May 23, 2016

This is still happening as of 2016-05-22

@yeago
Copy link

yeago commented May 26, 2016

querysets can be millions of items long :/

@mpetyx
Copy link

mpetyx commented Oct 3, 2016

any idea on how to handle this issue because it keeps repeating again and again?
thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants