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

Running some tasks only once #286

Open
capooti opened this issue Jun 7, 2017 · 2 comments
Open

Running some tasks only once #286

capooti opened this issue Jun 7, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@capooti
Copy link
Contributor

capooti commented Jun 7, 2017

Some periodic task should run only once at a time. For example tindex_cached_layers

Here there is some good hint to get this done:
https://stackoverflow.com/questions/4095940/running-unique-tasks-with-celery

@capooti capooti added the celery label Jun 7, 2017
@capooti capooti added this to the 0.4 milestone Jun 7, 2017
@capooti capooti self-assigned this Jun 7, 2017
@JorgeMartinezG
Copy link
Member

@capooti Is the purpose to index cached layers one by one? I mean, the goal is to avoid search engine saturation, right?

If so, what about bulk indexing?

@capooti
Copy link
Contributor Author

capooti commented Jun 7, 2017

Yes, I am bulk indexing. In production that task is scheduled every 2 minutes. When checking services with many layers cache will be full of layers to index and it can happen that in 2 minutes that task is not completed, and there will be more ones running at the same time which can cause problems to solr

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

No branches or pull requests

2 participants