Merge branch 'master2'

pull/1/head
Raymond Yee 2012-04-05 14:18:12 -07:00
commit 69df6e503d
5 changed files with 27 additions and 41 deletions

View File

@ -30,6 +30,7 @@ to install python-setuptools in step 1:
1. `deactivate ; workon regluit`
1. `django-admin.py syncdb --migrate --noinput`
1. `django-admin.py celeryd --loglevel=INFO` start the celery daemon to perform asynchronous tasks like adding related editions, and display logging information in the foreground.`
1. `django-admin.py celerybeat -l INFO` to start the celerybeat daemon to handle scheduled tasks.
1. `django-admin.py runserver 0.0.0.0:8000` (you can change the port number from the default value of 8000)
1. point your browser at http://localhost:8000/

View File

@ -1,4 +1,6 @@
from os.path import dirname, realpath, join
import regluit
import datetime
PROJECT_DIR = dirname(dirname(realpath(__file__)))
@ -226,3 +228,23 @@ JQUERY_UI_HOME = "/static/js/jquery-ui-1.8.16.custom.min.js"
# Mailchimp archive JavaScript URL
CAMPAIGN_ARCHIVE_JS = "http://us2.campaign-archive1.com/generate-js/?u=15472878790f9faa11317e085&fid=28161&show=5"
# periodic tasks for celery
# start out with nothing scheduled
CELERYBEAT_SCHEDULE = {}
# define some periodic tasks
SEND_TEST_EMAIL_JOB = {
"task": "regluit.core.tasks.send_mail_task",
"schedule": datetime.timedelta(seconds=30),
"args": ('hi there', 'testing 1, 2, 3', 'raymond.yee@gmail.com', ['raymond.yee@gmail.com'])
}
EMIT_NOTIFICATIONS_JOB = {
"task": "regluit.core.tasks.emit_notifications",
"schedule": datetime.timedelta(seconds=60),
"args": ()
}
# by default, in common, we don't turn any of the celerybeat jobs on -- turn them on in the local settings file

View File

@ -126,4 +126,7 @@ LIVE_SERVER_TEST_URL = "http://127.0.0.1:8000"
UNGLUEIT_TEST_USER = None
UNGLUEIT_TEST_PASSWORD = None
# decide which of the period tasks to add to the schedule
#CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB
#CELERYBEAT_SCHEDULE['emit_notifications'] = EMIT_NOTIFICATIONS_JOB

View File

@ -1,6 +1,4 @@
from regluit.settings.common import *
import regluit
import datetime
DEBUG = False
TEMPLATE_DEBUG = DEBUG
@ -121,24 +119,6 @@ STATIC_ROOT = '/var/www/static'
IS_PREVIEW = False
# periodic tasks for celery
# start out with nothing scheduled
CELERYBEAT_SCHEDULE = {}
# define some periodic tasks
SEND_TEST_EMAIL_JOB = {
"task": "regluit.core.tasks.send_mail_task",
"schedule": datetime.timedelta(seconds=30),
"args": ('hi there', 'testing 1, 2, 3', 'raymond.yee@gmail.com', ['raymond.yee@gmail.com'])
}
EMIT_NOTIFICATIONS_JOB = {
"task": "regluit.core.tasks.emit_notifications",
"schedule": datetime.timedelta(seconds=60),
"args": ()
}
# decide which of the period tasks to add to the schedule
CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB
#CELERYBEAT_SCHEDULE['emit_notifications'] = EMIT_NOTIFICATIONS_JOB

View File

@ -1,6 +1,4 @@
from regluit.settings.common import *
import regluit
import datetime
DEBUG = False
TEMPLATE_DEBUG = DEBUG
@ -120,24 +118,6 @@ LOGGING = {
STATIC_ROOT = '/var/www/static'
# periodic tasks for celery
# start out with nothing scheduled
CELERYBEAT_SCHEDULE = {}
# define some periodic tasks
SEND_TEST_EMAIL_JOB = {
"task": "regluit.core.tasks.send_mail_task",
"schedule": datetime.timedelta(seconds=30),
"args": ('hi there', 'testing 1, 2, 3', 'raymond.yee@gmail.com', ['raymond.yee@gmail.com'])
}
EMIT_NOTIFICATIONS_JOB = {
"task": "regluit.core.tasks.emit_notifications",
"schedule": datetime.timedelta(seconds=60),
"args": ()
}
# decide which of the period tasks to add to the schedule
CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB
#CELERYBEAT_SCHEDULE['emit_notifications'] = EMIT_NOTIFICATIONS_JOB