annotate celeryconfig.py @ 489:460ad816820d celery

fixed bug when new repo had no last commiter, fixed bug when my_account updating information failed, by not uniq email address.
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 20 Sep 2010 22:47:20 +0200
parents d3f701d912bd
children 2256c78afe53
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
467
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 # List of modules to import when celery starts.
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 import sys
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 import os
483
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
4 import ConfigParser
484
d3f701d912bd fixed up celeryconfig, to get results database from config files
Marcin Kuzminski <marcin@python-works.com>
parents: 483
diff changeset
5 root = os.getcwd()
483
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
6
484
d3f701d912bd fixed up celeryconfig, to get results database from config files
Marcin Kuzminski <marcin@python-works.com>
parents: 483
diff changeset
7 PYLONS_CONFIG_NAME = 'development.ini'
483
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
8
484
d3f701d912bd fixed up celeryconfig, to get results database from config files
Marcin Kuzminski <marcin@python-works.com>
parents: 483
diff changeset
9 sys.path.append(root)
483
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
10 config = ConfigParser.ConfigParser({'here':root})
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
11 config.read('%s/%s' % (root, PYLONS_CONFIG_NAME))
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
12 PYLONS_CONFIG = config
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
13
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
14 CELERY_IMPORTS = ("pylons_app.lib.celerylib.tasks",)
467
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 ## Result store settings.
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 CELERY_RESULT_BACKEND = "database"
484
d3f701d912bd fixed up celeryconfig, to get results database from config files
Marcin Kuzminski <marcin@python-works.com>
parents: 483
diff changeset
18 CELERY_RESULT_DBURI = dict(config.items('app:main'))['sqlalchemy.db1.url']
467
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19
474
a3d9d24acbec Implemented password reset(forms/models/ tasks) and mailing tasks.
Marcin Kuzminski <marcin@python-works.com>
parents: 467
diff changeset
20 BROKER_CONNECTION_MAX_RETRIES = 30
467
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 ## Broker settings.
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 BROKER_HOST = "localhost"
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 BROKER_PORT = 5672
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 BROKER_VHOST = "rabbitmqhost"
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 BROKER_USER = "rabbitmq"
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 BROKER_PASSWORD = "qweqwe"
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 ## Worker settings
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 ## If you're doing mostly I/O you can have more processes,
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 ## but if mostly spending CPU, try to keep it close to the
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 ## number of CPUs on your machine. If not set, the number of CPUs/cores
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 ## available will be used.
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 CELERYD_CONCURRENCY = 2
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 # CELERYD_LOG_FILE = "celeryd.log"
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 CELERYD_LOG_LEVEL = "DEBUG"
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
37 CELERYD_MAX_TASKS_PER_CHILD = 1
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
38
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
39 #CELERY_ALWAYS_EAGER = True
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40 #rabbitmqctl add_user rabbitmq qweqwe
3fc3ce53659b starting celery branch
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
41 #rabbitmqctl add_vhost rabbitmqhost
483
a9e50dce3081 Removed config names from whoosh and celery,
Marcin Kuzminski <marcin@python-works.com>
parents: 474
diff changeset
42 #rabbitmqctl set_permissions -p rabbitmqhost rabbitmq ".*" ".*" ".*"