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

Reindex as celery task #3459

Merged
merged 3 commits into from
Mar 30, 2018
Merged

Reindex as celery task #3459

merged 3 commits into from
Mar 30, 2018

Conversation

ewdurbin
Copy link
Member

this runs in ~1minute now... may as well make it a celery task and update it every 3 hours instead of nightly :)

Recreate the Search Index.
"""

config.task(_reindex).apply_async()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dstufft I couldn't figure out how to get this to run "in the foreground".

I tried wrapping apply() in a way similar to warehouse.tasks:WarehouseTask.apply_async() but kept getting transaction.interfaces.NoTransaction

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runs great on the worker though!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably have to do some setup to get the request in a reasonable state.

@ewdurbin ewdurbin merged commit ce894db into master Mar 30, 2018
@ewdurbin ewdurbin deleted the reindex_as_celery_task branch March 30, 2018 08:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants