Mercurial > wikked
annotate backend.py @ 151:f32af0888382
Added support for ElasticSearch indexing:
- More configurable setup for wiki providers (SCM, indexing, etc.).
- Lazy importing of provider specific packages.
- Nicer search results.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 16 Dec 2013 20:59:42 -0800 |
parents | 87606db8c641 |
children | a4a64d6b66cb |
rev | line source |
---|---|
138
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 import logging |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 from celery import Celery |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 logging.basicConfig(level=logging.DEBUG) |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 app = Celery( |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 'wikked', |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 broker='amqp://', |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 backend='amqp://', |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 include=['wikked.tasks']) |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 if __name__ == '__main__': |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 app.start() |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 |