Skip to content

Instantly share code, notes, and snippets.

@bhardin
Created September 21, 2016 15:12
Show Gist options
  • Save bhardin/66eea8833e2e5229c3c9d8af2afe34bd to your computer and use it in GitHub Desktop.
Save bhardin/66eea8833e2e5229c3c9d8af2afe34bd to your computer and use it in GitHub Desktop.
from celery.schedules import crontab
from myapp.common import constants
ALL = 'all'
tasks = {
# Tasks that should be run in all environments
ALL: {},
# Tasks that should be run on production
constants.ENV_PRODUCTION: {
'update_stored_corporation_data': {
'task': 'analytics.update_all_corporations',
'schedule': crontab(hour=7, minute=0), # midnight PST
}
},
constants.ENV_QA: {
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment