Mercurial > wikked
annotate backend.py @ 153:b4a69ee1a608
Suport for live n-gram-based search with ElasticSearch indexer.
Better ElasticSearch initialization.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 23 Dec 2013 23:16:35 -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 |