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

Put search index process into background queue #854

Open
2 of 4 tasks
leonholub opened this issue Nov 29, 2017 · 1 comment
Open
2 of 4 tasks

Put search index process into background queue #854

leonholub opened this issue Nov 29, 2017 · 1 comment
Assignees

Comments

@leonholub
Copy link

leonholub commented Nov 29, 2017

To reduce response times when saving models to the database the elasticsearch index should be updated in a background process and not in the save method.
This would require a celery task queue with a background task.

  • set up redis
  • add celery to django project
  • add background task
  • add possibility to track task status
@leonholub leonholub self-assigned this Nov 30, 2017
@rafa-munoz rafa-munoz assigned rafa-munoz and unassigned rafa-munoz and leonholub Dec 22, 2017
@rafa-munoz
Copy link
Contributor

There was some progress from Leon. An extract from my conversation with him:

He has created Celery Tasks for the Index and Delete processes and has tested locally.
Almost everything works, but there is still a problem. In the Indicator model comes the error:

is not JSON serializable

Aside from that it goes well with the queue. The other models were not tested.

I think there should be a way to make the models json serializable to put them in the queue.

Branch:
https://github.com/toladata/TolaActivity/tree/search-index-queue

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

No branches or pull requests

3 participants