comparison celeryconfig.py @ 493:2256c78afe53 celery

implemented basic autoupdating statistics fetched from database
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 22 Sep 2010 04:30:36 +0200
parents d3f701d912bd
children d5efb83590ef
comparison
equal deleted inserted replaced
492:a5a17000e45b 493:2256c78afe53
14 CELERY_IMPORTS = ("pylons_app.lib.celerylib.tasks",) 14 CELERY_IMPORTS = ("pylons_app.lib.celerylib.tasks",)
15 15
16 ## Result store settings. 16 ## Result store settings.
17 CELERY_RESULT_BACKEND = "database" 17 CELERY_RESULT_BACKEND = "database"
18 CELERY_RESULT_DBURI = dict(config.items('app:main'))['sqlalchemy.db1.url'] 18 CELERY_RESULT_DBURI = dict(config.items('app:main'))['sqlalchemy.db1.url']
19 CELERY_RESULT_SERIALIZER = 'json'
20
19 21
20 BROKER_CONNECTION_MAX_RETRIES = 30 22 BROKER_CONNECTION_MAX_RETRIES = 30
21 23
22 ## Broker settings. 24 ## Broker settings.
23 BROKER_HOST = "localhost" 25 BROKER_HOST = "localhost"
34 CELERYD_CONCURRENCY = 2 36 CELERYD_CONCURRENCY = 2
35 # CELERYD_LOG_FILE = "celeryd.log" 37 # CELERYD_LOG_FILE = "celeryd.log"
36 CELERYD_LOG_LEVEL = "DEBUG" 38 CELERYD_LOG_LEVEL = "DEBUG"
37 CELERYD_MAX_TASKS_PER_CHILD = 1 39 CELERYD_MAX_TASKS_PER_CHILD = 1
38 40
39 #CELERY_ALWAYS_EAGER = True 41 #Tasks will never be sent to the queue, but executed locally instead.
40 #rabbitmqctl add_user rabbitmq qweqwe 42 CELERY_ALWAYS_EAGER = False
41 #rabbitmqctl add_vhost rabbitmqhost 43
42 #rabbitmqctl set_permissions -p rabbitmqhost rabbitmq ".*" ".*" ".*" 44 #===============================================================================
45 # EMAIL SETTINGS
46 #===============================================================================
47 pylons_email_config = dict(config.items('DEFAULT'))
48
49 CELERY_SEND_TASK_ERROR_EMAILS = True
50
51 #List of (name, email_address) tuples for the admins that should receive error e-mails.
52 ADMINS = [('Administrator', pylons_email_config.get('email_to'))]
53
54 #The e-mail address this worker sends e-mails from. Default is "celery@localhost".
55 SERVER_EMAIL = pylons_email_config.get('error_email_from')
56
57 #The mail server to use. Default is "localhost".
58 MAIL_HOST = pylons_email_config.get('smtp_server')
59
60 #Username (if required) to log on to the mail server with.
61 MAIL_HOST_USER = pylons_email_config.get('smtp_username')
62
63 #Password (if required) to log on to the mail server with.
64 MAIL_HOST_PASSWORD = pylons_email_config.get('smtp_password')
65
66 MAIL_PORT = pylons_email_config.get('smtp_port')
67
68
69 #===============================================================================
70 # INSTRUCTIONS FOR RABBITMQ
71 #===============================================================================
72 # rabbitmqctl add_user rabbitmq qweqwe
73 # rabbitmqctl add_vhost rabbitmqhost
74 # rabbitmqctl set_permissions -p rabbitmqhost rabbitmq ".*" ".*" ".*"