Mercurial > wikked
annotate backend.py @ 139:2ec24079d9df
Updated requirements.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 08 Dec 2013 13:12:46 -0800 |
parents | df04e6a875ba |
children | 87606db8c641 |
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 from utils import find_wiki_root |
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 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 logging.basicConfig(level=logging.DEBUG) |
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 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 app = Celery( |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 'wikked', |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 broker='amqp://', |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 backend='amqp://', |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 include=['wikked.tasks']) |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 if __name__ == '__main__': |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 app.start() |
df04e6a875ba
Added Celery-powered background updates to wiki pages.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 |